aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index da0d6e20d..1b8bb1c3e 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -1136,6 +1136,7 @@ send_connection_keepalive (struct CadetConnection *c, int fwd)
1136{ 1136{
1137 struct GNUNET_MessageHeader msg; 1137 struct GNUNET_MessageHeader msg;
1138 struct CadetFlowControl *fc; 1138 struct CadetFlowControl *fc;
1139 int tunnel_ready;
1139 1140
1140 GCC_check_connections (); 1141 GCC_check_connections ();
1141 LOG (GNUNET_ERROR_TYPE_INFO, 1142 LOG (GNUNET_ERROR_TYPE_INFO,
@@ -1144,7 +1145,9 @@ send_connection_keepalive (struct CadetConnection *c, int fwd)
1144 1145
1145 GNUNET_assert (NULL != c->t); 1146 GNUNET_assert (NULL != c->t);
1146 fc = fwd ? &c->fwd_fc : &c->bck_fc; 1147 fc = fwd ? &c->fwd_fc : &c->bck_fc;
1147 if (0 < fc->queue_n || GNUNET_YES == GCT_has_queued_traffic (c->t)) 1148 tunnel_ready = GNUNET_YES == GCT_has_queued_traffic (c->t)
1149 && CADET_TUNNEL_KEY_OK <= GCT_get_estate (c->t);
1150 if (0 < fc->queue_n || tunnel_ready)
1148 { 1151 {
1149 LOG (GNUNET_ERROR_TYPE_INFO, "not sending keepalive, traffic in queue\n"); 1152 LOG (GNUNET_ERROR_TYPE_INFO, "not sending keepalive, traffic in queue\n");
1150 return; 1153 return;