aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-09-17 11:56:04 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-09-17 11:56:04 +0000
commit7376708ac7b99e80fb28e47b4acb305ef8069d3c (patch)
tree16b5fde5b35985465be062fcb6889f5f7ba365da
parent655b8bbaa8e17b53b02e33533d42719ff1254021 (diff)
- do not crash on shutdown
-rw-r--r--src/transport/transport_api.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index c905a15492..2d4890db9a 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -988,7 +988,12 @@ GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
const struct GNUNET_PeerIdentity *target)
{
struct GNUNET_PeerIdentity *pid;
- GNUNET_assert (NULL != handle->client);
+ if (NULL == handle->client)
+ {
+ /* FIXME: handle->client can be NULL when transport api is reconnecting */
+ GNUNET_break (0);
+ return;
+ }
pid = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity));
*pid = *target;