gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: speed up message goodput in perf_mq(clie


From: gnunet
Subject: [gnunet] branch master updated: speed up message goodput in perf_mq(client) by 1/3rd
Date: Tue, 04 Feb 2020 19:22:11 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 1ca805654 speed up message goodput in perf_mq(client) by 1/3rd
1ca805654 is described below

commit 1ca80565458244e9a9622d65bd3953fa3478372a
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Feb 4 19:18:25 2020 +0100

    speed up message goodput in perf_mq(client) by 1/3rd
---
 src/util/client.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/util/client.c b/src/util/client.c
index 024f34b3a..93442f0c6 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -270,11 +270,22 @@ RETRY:
   ret = GNUNET_NETWORK_socket_send (cstate->sock,
                                     &pos[cstate->msg_off],
                                     len - cstate->msg_off);
+  if ( (-1 == ret) &&
+       (EAGAIN == errno) )
+  {
+    cstate->send_task
+      = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
+                                        cstate->sock,
+                                        &transmit_ready,
+                                        cstate);
+    return;
+  }
   if (-1 == ret)
   {
     LOG (GNUNET_ERROR_TYPE_WARNING,
-         "Error during sending message of type %u\n",
-         ntohs (cstate->msg->type));
+         "Error during sending message of type %u: %s\n",
+         ntohs (cstate->msg->type),
+         strerror (errno));
     if (EINTR == errno)
     {
       LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -845,10 +856,8 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq,
     return;   /* still waiting for connection */
   }
   cstate->send_task
-    = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
-                                      cstate->sock,
-                                      &transmit_ready,
-                                      cstate);
+    = GNUNET_SCHEDULER_add_now (&transmit_ready,
+                                cstate);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]