Fix websocket to glib IO condition mapping
This commit is contained in:
@@ -327,14 +327,16 @@ WebsocketsServer::io_handler (Glib::IOCondition ioc, lws_sockfd_type fd)
|
|||||||
IOCondition
|
IOCondition
|
||||||
WebsocketsServer::events_to_ioc (int events)
|
WebsocketsServer::events_to_ioc (int events)
|
||||||
{
|
{
|
||||||
IOCondition ioc;
|
IOCondition ioc = Glib::IOCondition (0);
|
||||||
|
|
||||||
if (events & LWS_POLLIN) {
|
if (events & LWS_POLLIN) {
|
||||||
ioc = Glib::IO_IN;
|
ioc |= Glib::IO_IN;
|
||||||
} else if (events & LWS_POLLOUT) {
|
}
|
||||||
ioc = Glib::IO_OUT;
|
if (events & LWS_POLLOUT) {
|
||||||
} else if (events & LWS_POLLHUP) {
|
ioc |= Glib::IO_OUT;
|
||||||
ioc = Glib::IO_HUP;
|
}
|
||||||
|
if (events & LWS_POLLHUP) {
|
||||||
|
ioc |= Glib::IO_HUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ioc;
|
return ioc;
|
||||||
|
|||||||
Reference in New Issue
Block a user