aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 2acbbaeb1..6d4549f35 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1473,20 +1473,19 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection,
1473 GNUNET_free (sc); 1473 GNUNET_free (sc);
1474 plugin->cur_connections--; 1474 plugin->cur_connections--;
1475 1475
1476 if (((s->server_send == NULL) || (s->server_recv == NULL)) &&
1477 ((GNUNET_YES == s->session_passed) && (GNUNET_NO == s->session_ended)))
1478 {
1479 /* Notify transport immediately that this session is invalid */
1480 s->session_ended = GNUNET_YES;
1481 plugin->env->session_end (plugin->env->cls, &s->target, s);
1482 }
1483
1484 if ((s->server_send == NULL) && (s->server_recv == NULL)) 1476 if ((s->server_send == NULL) && (s->server_recv == NULL))
1485 { 1477 {
1486 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 1478 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
1487 "Peer `%s' on address `%s' disconnected\n", 1479 "Peer `%s' on address `%s' disconnected\n",
1488 GNUNET_i2s (&s->target), 1480 GNUNET_i2s (&s->target),
1489 http_common_plugin_address_to_string (NULL, s->addr, s->addrlen)); 1481 http_common_plugin_address_to_string (NULL, s->addr, s->addrlen));
1482
1483 if ((GNUNET_YES == s->session_passed) && (GNUNET_NO == s->session_ended))
1484 {
1485 /* Notify transport immediately that this session is invalid */
1486 s->session_ended = GNUNET_YES;
1487 plugin->env->session_end (plugin->env->cls, &s->target, s);
1488 }
1490 server_delete_session (s); 1489 server_delete_session (s);
1491 } 1490 }
1492 1491
@@ -1636,10 +1635,10 @@ server_schedule (struct HTTP_Server_Plugin *plugin,
1636 last_timeout, timeout); 1635 last_timeout, timeout);
1637 last_timeout = timeout; 1636 last_timeout = timeout;
1638 } 1637 }
1639 if (timeout <= GNUNET_TIME_UNIT_SECONDS.rel_value) 1638 //if (timeout <= GNUNET_TIME_UNIT_SECONDS.rel_value)
1640 tv.rel_value = (uint64_t) timeout; 1639 tv.rel_value = (uint64_t) timeout;
1641 else 1640 //else
1642 tv = GNUNET_TIME_UNIT_SECONDS; 1641 //tv = GNUNET_TIME_UNIT_SECONDS;
1643 } 1642 }
1644 else 1643 else
1645 tv = GNUNET_TIME_UNIT_SECONDS; 1644 tv = GNUNET_TIME_UNIT_SECONDS;