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.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 7e585ba04..fba3601c8 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -133,6 +133,11 @@ struct Session
133 int session_ended; 133 int session_ended;
134 134
135 /** 135 /**
136 * Are incoming connection established at the moment
137 */
138 int connect_in_progress;
139
140 /**
136 * Absolute time when to receive data again 141 * Absolute time when to receive data again
137 * Used for receive throttling 142 * Used for receive throttling
138 */ 143 */
@@ -525,7 +530,7 @@ http_server_plugin_send (void *cls,
525 GNUNET_break (0); 530 GNUNET_break (0);
526 return GNUNET_SYSERR; 531 return GNUNET_SYSERR;
527 } 532 }
528 if (NULL == session->server_send) 533 if ((NULL == session->server_send) && (GNUNET_NO == session->connect_in_progress))
529 { 534 {
530 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, session->plugin->name, 535 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, session->plugin->name,
531 "Session %p/connection %p: Sending message with %u bytes to peer `%s' with FAILED\n", 536 "Session %p/connection %p: Sending message with %u bytes to peer `%s' with FAILED\n",
@@ -1104,6 +1109,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1104 s->server_send = NULL; 1109 s->server_send = NULL;
1105 s->session_passed = GNUNET_NO; 1110 s->session_passed = GNUNET_NO;
1106 s->session_ended = GNUNET_NO; 1111 s->session_ended = GNUNET_NO;
1112 s->connect_in_progress = GNUNET_YES;
1107 server_start_session_timeout(s); 1113 server_start_session_timeout(s);
1108 GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s); 1114 GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s);
1109 } 1115 }
@@ -1120,6 +1126,10 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1120 s->server_send = sc; 1126 s->server_send = sc;
1121 if (direction == _RECEIVE) 1127 if (direction == _RECEIVE)
1122 s->server_recv = sc; 1128 s->server_recv = sc;
1129
1130 if ((NULL != s->server_send) && (NULL != s->server_send))
1131 s->connect_in_progress = GNUNET_NO; /* PUT and GET are connected */
1132
1123#if MHD_VERSION >= 0x00090E00 1133#if MHD_VERSION >= 0x00090E00
1124 if ((NULL == s->server_recv) || (NULL == s->server_send)) 1134 if ((NULL == s->server_recv) || (NULL == s->server_send))
1125 { 1135 {