-only schedule select once per fragmented message
authorChristian Grothoff <christian@grothoff.org>
Sun, 18 Oct 2015 18:16:59 +0000 (18:16 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 18 Oct 2015 18:16:59 +0000 (18:16 +0000)
src/transport/plugin_transport_udp.c

index af1b412c2987a754c4bfc03fad18f09bb33fedbe..e10a924d138eaa9f1b05c740d662a49f3ff1da61 100644 (file)
@@ -1859,10 +1859,6 @@ enqueue_fragment (void *cls,
           msg_len);
   enqueue (plugin,
            udpw);
-  if (sizeof (struct IPv4UdpAddress) == session->address->address_length)
-    schedule_select_v4 (plugin);
-  else
-    schedule_select_v6 (plugin);
 }
 
 
@@ -2101,6 +2097,10 @@ udp_plugin_send (void *cls,
                                                      frag_ctx);
     s->frag_ctx = frag_ctx;
     s->last_transmit_time = frag_ctx->next_frag_time;
+    if (sizeof (struct IPv4UdpAddress) == s->address->address_length)
+      schedule_select_v4 (plugin);
+    else
+      schedule_select_v6 (plugin);
     GNUNET_STATISTICS_update (plugin->env->stats,
                               "# UDP, fragmented messages active",
                               1,