diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-07-02 07:39:27 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-07-02 07:39:27 +0000 |
commit | 13c92b1966accce020a6a5d3f90b252c55a4ad2f (patch) | |
tree | 0ae19d083227eb88316ac5e874315ae3de483926 /src/transport/plugin_transport_http_client.c | |
parent | 7e1020d1a16d84aa32eaf7189a0e6668acd9b671 (diff) | |
download | gnunet-13c92b1966accce020a6a5d3f90b252c55a4ad2f.tar.gz gnunet-13c92b1966accce020a6a5d3f90b252c55a4ad2f.zip |
tracking down connection exceeded issue
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index cf75ec5d7..e996c70c5 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -553,7 +553,7 @@ client_schedule (struct HTTP_Client_Plugin *plugin, | |||
553 | mret = curl_multi_fdset (plugin->curl_multi_handle, &rs, &ws, &es, &max); | 553 | mret = curl_multi_fdset (plugin->curl_multi_handle, &rs, &ws, &es, &max); |
554 | if (mret != CURLM_OK) | 554 | if (mret != CURLM_OK) |
555 | { | 555 | { |
556 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("%s failed at %s:%d: `%s'\n"), | 556 | LOG (GNUNET_ERROR_TYPE_ERROR, _("%s failed at %s:%d: `%s'\n"), |
557 | "curl_multi_fdset", __FILE__, __LINE__, | 557 | "curl_multi_fdset", __FILE__, __LINE__, |
558 | curl_multi_strerror (mret)); | 558 | curl_multi_strerror (mret)); |
559 | return GNUNET_SYSERR; | 559 | return GNUNET_SYSERR; |
@@ -568,7 +568,7 @@ client_schedule (struct HTTP_Client_Plugin *plugin, | |||
568 | 568 | ||
569 | if (mret != CURLM_OK) | 569 | if (mret != CURLM_OK) |
570 | { | 570 | { |
571 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 571 | LOG (GNUNET_ERROR_TYPE_ERROR, |
572 | _("%s failed at %s:%d: `%s'\n"), | 572 | _("%s failed at %s:%d: `%s'\n"), |
573 | "curl_multi_timeout", __FILE__, __LINE__, | 573 | "curl_multi_timeout", __FILE__, __LINE__, |
574 | curl_multi_strerror (mret)); | 574 | curl_multi_strerror (mret)); |
@@ -1319,6 +1319,9 @@ curl_easy_getinfo (easy_h, | |||
1319 | curl_easy_cleanup (easy_h); | 1319 | curl_easy_cleanup (easy_h); |
1320 | GNUNET_assert (plugin->cur_connections > 0); | 1320 | GNUNET_assert (plugin->cur_connections > 0); |
1321 | plugin->cur_connections--; | 1321 | plugin->cur_connections--; |
1322 | LOG (GNUNET_ERROR_TYPE_INFO, | ||
1323 | "PUT request done, number of connections decreased to %u\n", | ||
1324 | plugin->cur_connections); | ||
1322 | s->put_tmp_disconnecting = GNUNET_NO; | 1325 | s->put_tmp_disconnecting = GNUNET_NO; |
1323 | s->put_tmp_disconnected = GNUNET_YES; | 1326 | s->put_tmp_disconnected = GNUNET_YES; |
1324 | s->put.easyhandle = NULL; | 1327 | s->put.easyhandle = NULL; |
@@ -1366,6 +1369,9 @@ curl_easy_getinfo (easy_h, | |||
1366 | /* FIXME: who calls curl_multi_remove on 'easy_h' now!? */ | 1369 | /* FIXME: who calls curl_multi_remove on 'easy_h' now!? */ |
1367 | GNUNET_assert (plugin->cur_connections > 0); | 1370 | GNUNET_assert (plugin->cur_connections > 0); |
1368 | plugin->cur_connections--; | 1371 | plugin->cur_connections--; |
1372 | LOG (GNUNET_ERROR_TYPE_INFO, | ||
1373 | "GET request done, number of connections decreased to %u\n", | ||
1374 | plugin->cur_connections); | ||
1369 | /* If we are emulating an XHR client we need to make another GET | 1375 | /* If we are emulating an XHR client we need to make another GET |
1370 | * request. | 1376 | * request. |
1371 | */ | 1377 | */ |
@@ -1487,6 +1493,9 @@ client_connect_get (struct Session *s) | |||
1487 | return GNUNET_SYSERR; | 1493 | return GNUNET_SYSERR; |
1488 | } | 1494 | } |
1489 | s->plugin->cur_connections++; | 1495 | s->plugin->cur_connections++; |
1496 | LOG (GNUNET_ERROR_TYPE_INFO, | ||
1497 | "GET request `%s' established, number of connections increased to %u\n", | ||
1498 | s->url, s->plugin->cur_connections); | ||
1490 | return GNUNET_OK; | 1499 | return GNUNET_OK; |
1491 | } | 1500 | } |
1492 | 1501 | ||
@@ -1586,7 +1595,9 @@ client_connect_put (struct Session *s) | |||
1586 | } | 1595 | } |
1587 | s->put_tmp_disconnected = GNUNET_NO; | 1596 | s->put_tmp_disconnected = GNUNET_NO; |
1588 | s->plugin->cur_connections++; | 1597 | s->plugin->cur_connections++; |
1589 | 1598 | LOG (GNUNET_ERROR_TYPE_INFO, | |
1599 | "PUT request `%s' established, number of connections increased to %u\n", | ||
1600 | s->url, s->plugin->cur_connections); | ||
1590 | return GNUNET_OK; | 1601 | return GNUNET_OK; |
1591 | } | 1602 | } |
1592 | 1603 | ||
@@ -1730,6 +1741,7 @@ http_client_plugin_get_session (void *cls, | |||
1730 | if (NULL != s) | 1741 | if (NULL != s) |
1731 | return s; | 1742 | return s; |
1732 | 1743 | ||
1744 | /* create a new session */ | ||
1733 | if (plugin->max_connections <= plugin->cur_connections) | 1745 | if (plugin->max_connections <= plugin->cur_connections) |
1734 | { | 1746 | { |
1735 | LOG (GNUNET_ERROR_TYPE_WARNING, | 1747 | LOG (GNUNET_ERROR_TYPE_WARNING, |