mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 05:16:18 +01:00
Set the listen backlog before calling listen.
If we set it after it won't be used.
This commit is contained in:
parent
64383fa3d9
commit
18373cfbe8
@ -235,7 +235,6 @@ g_socket_listener_add_socket (GSocketListener *listener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_ptr_array_add (listener->priv->sockets, socket);
|
g_ptr_array_add (listener->priv->sockets, socket);
|
||||||
g_socket_set_listen_backlog (socket, listener->priv->listen_backlog);
|
|
||||||
|
|
||||||
if (source_object)
|
if (source_object)
|
||||||
g_object_set_qdata_full (G_OBJECT (socket), source_quark,
|
g_object_set_qdata_full (G_OBJECT (socket), source_quark,
|
||||||
@ -286,6 +285,8 @@ g_socket_listener_add_address (GSocketListener *listener,
|
|||||||
if (socket == NULL)
|
if (socket == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
g_socket_set_listen_backlog (socket, listener->priv->listen_backlog);
|
||||||
|
|
||||||
if (!g_socket_bind (socket, address, TRUE, error) ||
|
if (!g_socket_bind (socket, address, TRUE, error) ||
|
||||||
!g_socket_listen (socket, error) ||
|
!g_socket_listen (socket, error) ||
|
||||||
!g_socket_listener_add_socket (listener, socket,
|
!g_socket_listener_add_socket (listener, socket,
|
||||||
|
Loading…
Reference in New Issue
Block a user