aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/gnunet-service-transport.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 61a6c01a6..2c939a4be 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -2608,7 +2608,8 @@ plugin_env_session_end (void *cls,
2608 gettext_noop ("# try_fast_reconnect thanks to plugin_env_session_end"), 2608 gettext_noop ("# try_fast_reconnect thanks to plugin_env_session_end"),
2609 1, 2609 1,
2610 GNUNET_NO); 2610 GNUNET_NO);
2611 try_fast_reconnect (p, nl); 2611 if (GNUNET_YES == pos->connected)
2612 try_fast_reconnect (p, nl);
2612 } 2613 }
2613 else 2614 else
2614 { 2615 {
@@ -2616,7 +2617,8 @@ plugin_env_session_end (void *cls,
2616 gettext_noop ("# disconnects due to missing pong"), 2617 gettext_noop ("# disconnects due to missing pong"),
2617 1, 2618 1,
2618 GNUNET_NO); 2619 GNUNET_NO);
2619 disconnect_neighbour (nl, GNUNET_YES); 2620 if (GNUNET_YES == pos->connected)
2621 disconnect_neighbour (nl, GNUNET_YES);
2620 } 2622 }
2621 return; 2623 return;
2622 } 2624 }
@@ -2632,6 +2634,12 @@ plugin_env_session_end (void *cls,
2632 } 2634 }
2633 GNUNET_free_non_null(pos->ressources); 2635 GNUNET_free_non_null(pos->ressources);
2634 GNUNET_free_non_null(pos->quality); 2636 GNUNET_free_non_null(pos->quality);
2637 if (GNUNET_YES != pos->connected)
2638 {
2639 /* nothing else to do, connection was never up... */
2640 GNUNET_free (pos);
2641 return;
2642 }
2635 GNUNET_free (pos); 2643 GNUNET_free (pos);
2636 ats->stat.recreate_problem = GNUNET_YES; 2644 ats->stat.recreate_problem = GNUNET_YES;
2637 if (nl->received_pong == GNUNET_NO) 2645 if (nl->received_pong == GNUNET_NO)
@@ -2647,7 +2655,7 @@ plugin_env_session_end (void *cls,
2647 pos = rl->addresses; 2655 pos = rl->addresses;
2648 while (pos != NULL) 2656 while (pos != NULL)
2649 { 2657 {
2650 if (pos->validated) 2658 if (GNUNET_YES == pos->validated)
2651 { 2659 {
2652 GNUNET_STATISTICS_update (stats, 2660 GNUNET_STATISTICS_update (stats,
2653 gettext_noop ("# try_fast_reconnect thanks to validated_address"), 2661 gettext_noop ("# try_fast_reconnect thanks to validated_address"),