summaryrefslogtreecommitdiff
path: root/libsoup
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2020-01-21 11:41:37 +0100
committerPatrick Griffis <tingping@tingping.se>2020-01-22 00:34:48 +0000
commit87e8c2ab9f3bc79befb0e3b25ec513cfd36fefe9 (patch)
tree9dfadacf39cf39051ccc5c799c9853c3316de721 /libsoup
parente2b29f34afb69e5639018bb72e06b0b2e8bc108d (diff)
downloadlibsoup-87e8c2ab9f3bc79befb0e3b25ec513cfd36fefe9.tar.gz
WebSockets: do not start the input source when IO is closing
We should not schedule a new read after reading the close message, since we don't expect more input. This fixes a crash due to an assert that checks that the input source is NULL when the connection is destroyed that happens when the connection is destroyed in the closed callback. Fixes #181
Diffstat (limited to 'libsoup')
-rw-r--r--libsoup/soup-websocket-connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c
index 2c7fc116..a4095e1c 100644
--- a/libsoup/soup-websocket-connection.c
+++ b/libsoup/soup-websocket-connection.c
@@ -1156,7 +1156,8 @@ soup_websocket_connection_read (SoupWebsocketConnection *self)
return;
}
- soup_websocket_connection_start_input_source (self);
+ if (!pv->io_closing)
+ soup_websocket_connection_start_input_source (self);
}
static gboolean