Commit 24cbb3f2 authored by Philip Withnall's avatar Philip Withnall

lib: Don’t close the server socket immediately when stopping the server

If we do, it’s possible for the final iteration of the server’s main
loop to process an incoming packet and to reference a NULL socket
pointer. Instead, use the more conventional soup_server_quit() call, and
allow the socket to be closed when the server is destroyed, which should
always be shortly afterwards because UhmServer completely controls the
lifetime of the SoupServer.

https://bugzilla.gnome.org/show_bug.cgi?id=731040
parent 65ec1033
......@@ -1373,7 +1373,7 @@ uhm_server_stop (UhmServer *self)
g_return_if_fail (priv->resolver != NULL);
/* Stop the server. */
soup_server_disconnect (priv->server);
soup_server_quit (priv->server);
g_thread_join (priv->server_thread);
priv->server_thread = NULL;
uhm_resolver_reset (priv->resolver);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment