diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2020-01-21 11:41:37 +0100 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2020-01-22 00:34:48 +0000 |
commit | 87e8c2ab9f3bc79befb0e3b25ec513cfd36fefe9 (patch) | |
tree | 9dfadacf39cf39051ccc5c799c9853c3316de721 /libsoup | |
parent | e2b29f34afb69e5639018bb72e06b0b2e8bc108d (diff) | |
download | libsoup-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.c | 3 |
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 |