-stop active offer before starting another one
authorChristian Grothoff <christian@grothoff.org>
Sun, 18 Oct 2015 14:04:59 +0000 (14:04 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 18 Oct 2015 14:04:59 +0000 (14:04 +0000)
src/cadet/gnunet-service-cadet_peer.c

index 7cc1381a40a6d3e65e0fd3f1a5ea6483017edd28..80a6bb98f8287ce913a83c9cf721074eb18013f7 100644 (file)
@@ -2574,6 +2574,11 @@ GCP_try_connect (struct CadetPeer *peer)
     return;
 
   mh = GNUNET_HELLO_get_header (hello);
+  if (NULL != peer->hello_offer)
+  {
+    GNUNET_TRANSPORT_offer_hello_cancel (peer->hello_offer);
+    peer->hello_offer = NULL;
+  }
   peer->hello_offer = GNUNET_TRANSPORT_offer_hello (transport_handle,
                                                     mh,
                                                     &hello_offer_done,