rescheduling sessions for udp
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 18 Dec 2013 11:53:48 +0000 (11:53 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 18 Dec 2013 11:53:48 +0000 (11:53 +0000)
src/transport/plugin_transport_udp.c

index 4480747a5b41a11973e970949bb488448532a9b4..b060bb7794d4b7259559ff2bfba079746db69deb 100644 (file)
@@ -1678,7 +1678,16 @@ udp_plugin_update_session_timeout (void *cls,
                                   const struct GNUNET_PeerIdentity *peer,
                                   struct Session *session)
 {
+  if (GNUNET_YES
+      != GNUNET_CONTAINER_multipeermap_contains_value (plugin->sessions,
+          &s->target, s))
+  {
+    GNUNET_break(0);
+    return;
+  }
 
+  /* Reschedule session timeout */
+  reschedule_session_timeout (session);
 }
 
 /**