possible fix for transport client state machine issue found in RPS profiler
authorChristian Grothoff <christian@grothoff.org>
Tue, 26 Feb 2019 11:26:37 +0000 (12:26 +0100)
committerChristian Grothoff <christian@grothoff.org>
Tue, 26 Feb 2019 11:26:51 +0000 (12:26 +0100)
src/transport/gnunet-service-transport.c
src/transport/transport_api_core.c

index c621ea686b8d6ff4348b5c6834efd53164117d14..c5fce94a7c806ba124b965941baaa62e3524469c 100644 (file)
@@ -444,8 +444,8 @@ unicast (struct TransportClient *tc,
                 GNUNET_MQ_get_length (tc->mq),
                 MAX_PENDING);
     GNUNET_STATISTICS_update (GST_stats,
-                              gettext_noop
-                              ("# messages dropped due to slow client"), 1,
+                              gettext_noop ("# messages dropped due to slow client"),
+                              1,
                               GNUNET_NO);
     return;
   }
@@ -1352,6 +1352,8 @@ GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
        NULL != tc;
        tc = tc->next)
   {
+    if (CT_NONE == tc->type)
+      continue; /* client not yet ready */
     if ( (GNUNET_YES == may_drop) &&
          (CT_CORE != tc->type) )
       continue; /* skip, this client does not care about payload */
@@ -1383,7 +1385,7 @@ GST_clients_broadcast_peer_notification (const struct GNUNET_PeerIdentity *peer,
 {
   struct GNUNET_MQ_Envelope *env;
   struct PeerIterateResponseMessage *msg;
-  
+
   msg = compose_address_iterate_response_message (peer,
                                                  address);
   msg->state = htonl (state);
index aa6da009844effba6958ebd146740df0b8ad6c38..e864991735dccaaef9b69f5cd4a99be16f572e02 100644 (file)
@@ -302,8 +302,9 @@ mq_error_handler (void *cls,
 {
   struct GNUNET_TRANSPORT_CoreHandle *h = cls;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Error receiving from transport service, disconnecting temporarily.\n");
+  LOG (GNUNET_ERROR_TYPE_ERROR,
+       "Error receiving from transport service (%d), disconnecting temporarily.\n",
+       error);
   disconnect_and_schedule_reconnect (h);
 }