From 9ae796ef10ccbcd1e31522a6ce522524657bf58c Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Wed, 2 Jul 2014 15:27:39 +0000 Subject: Simplify HTTP server session cleanup even more Allow HTTP clients to get disconnected without deleting their session so they can re-connect quickly. This also works for XHR clients which need to disconnect to work. --- src/transport/plugin_transport_http_server.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 6a6f28e8b..f6c64e602 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -1905,16 +1905,8 @@ server_disconnect_cb (void *cls, s->address->address, s->address->address_length)); s->server_send = NULL; - if (! ( (0 != (sc->options & OPTION_LONG_POLL)) && - (NULL != s->server_recv) ) ) - { - server_delete_session (s); - GNUNET_free (sc); - plugin->cur_connections--; - return; - } } - if (sc->direction == _RECEIVE) + else if (sc->direction == _RECEIVE) { LOG (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connection %p PUT on address `%s' disconnected\n", @@ -1932,19 +1924,6 @@ server_disconnect_cb (void *cls, } GNUNET_free (sc); plugin->cur_connections--; - - if ( (NULL == s->server_send) && - (NULL == s->server_recv) ) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Peer `%s' on address `%s' disconnected\n", - GNUNET_i2s (&s->target), - http_common_plugin_address_to_string (plugin->protocol, - s->address->address, - s->address->address_length)); - - server_delete_session (s); - } } -- cgit v1.2.3