mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 12:25:48 +01:00
Call sync close function directly in async implementation
The g_io_stream_wrapper fails since there is already an outstanding operation (the async close).
This commit is contained in:
parent
fdfdec36d0
commit
f061765e54
@ -291,11 +291,15 @@ g_socket_connection_close_async (GIOStream *stream,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GSimpleAsyncResult *res;
|
GSimpleAsyncResult *res;
|
||||||
|
GIOStreamClass *class;
|
||||||
GError *error;
|
GError *error;
|
||||||
|
|
||||||
|
class = G_IO_STREAM_GET_CLASS (stream);
|
||||||
|
|
||||||
/* socket close is not blocked, just do it! */
|
/* socket close is not blocked, just do it! */
|
||||||
error = NULL;
|
error = NULL;
|
||||||
if (!g_io_stream_close (stream, cancellable, &error))
|
if (class->close_fn &&
|
||||||
|
!class->close_fn (stream, cancellable, &error))
|
||||||
{
|
{
|
||||||
g_simple_async_report_gerror_in_idle (G_OBJECT (stream),
|
g_simple_async_report_gerror_in_idle (G_OBJECT (stream),
|
||||||
callback, user_data,
|
callback, user_data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user