Reconnect to service instead of aborting on a malformed data message
authorBart Polot <bart.polot+voyager@gmail.com>
Tue, 31 Jan 2017 03:58:05 +0000 (04:58 +0100)
committerBart Polot <bart.polot+voyager@gmail.com>
Tue, 31 Jan 2017 04:08:53 +0000 (05:08 +0100)
src/cadet/cadet_api.c

index 9448cc7a5669b08042d3207d1d9eea7bb2553490..a1c7e8461cd2222da94fd12ccf613eee3708b07b 100644 (file)
@@ -958,7 +958,12 @@ handle_local_data (void *cls,
 
   ch = retrieve_channel (h,
                          message->ccn);
-  GNUNET_assert (NULL != ch);
+  if (NULL == ch)
+  {
+    GNUNET_break_op (0);
+    reconnect (h);
+    return;
+  }
 
   payload = (struct GNUNET_MessageHeader *) &message[1];
   type = ntohs (payload->type);