summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io/channel-websock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/io/channel-websock.c b/io/channel-websock.c
index dc43dc6bb9..77d30f0e4a 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -1225,12 +1225,18 @@ qio_channel_websock_source_check(GSource *source)
QIOChannelWebsockSource *wsource = (QIOChannelWebsockSource *)source;
GIOCondition cond = 0;
- if (wsource->wioc->rawinput.offset || wsource->wioc->io_eof) {
+ if (wsource->wioc->rawinput.offset) {
cond |= G_IO_IN;
}
if (wsource->wioc->encoutput.offset < QIO_CHANNEL_WEBSOCK_MAX_BUFFER) {
cond |= G_IO_OUT;
}
+ if (wsource->wioc->io_eof) {
+ cond |= G_IO_HUP;
+ }
+ if (wsource->wioc->io_err) {
+ cond |= G_IO_ERR;
+ }
return cond & wsource->condition;
}