diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2019-06-21 07:31:24 +0200 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2019-06-25 10:23:45 +0200 |
commit | fd794a952f5a3bdc2adf15e5245a3bffdeeee350 (patch) | |
tree | 1b3a8d1e38870e6d6adb60d8947408c9f3cd6d9d /libsoup/soup-io-stream.c | |
parent | 23762ad4d4e8e82fd869bcb71feba0f6db75cb3b (diff) | |
download | libsoup-fd794a952f5a3bdc2adf15e5245a3bffdeeee350.tar.gz |
WebSockets: closed signal not emitted when io stream is SoupIOStream
That's the case of connections created by SoupSession. In that case, if
the server hasn't closed its end of the connection, we fail to shutdown
the client end, because shutdown_wr_io_stream() does nothing when the io
stream is not a GSocketConnection. So, for SoupIOStream we need to get
the base io stream which is a GSocketConnection.
Diffstat (limited to 'libsoup/soup-io-stream.c')
-rw-r--r-- | libsoup/soup-io-stream.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libsoup/soup-io-stream.c b/libsoup/soup-io-stream.c index 9c77b267..1c07262d 100644 --- a/libsoup/soup-io-stream.c +++ b/libsoup/soup-io-stream.c @@ -217,3 +217,11 @@ soup_io_stream_new (GIOStream *base_iostream, "close-on-dispose", close_on_dispose, NULL); } + +GIOStream * +soup_io_stream_get_base_iostream (SoupIOStream *stream) +{ + g_return_val_if_fail (SOUP_IS_IO_STREAM (stream), NULL); + + return stream->priv->base_iostream; +} |