The silc_client_connect_to_[server|client] and
[silc.git] / lib / silcclient / client_keyagr.c
index 52dca47c040be11f66ac6e3782fbc0fd95c6b742..d5f9048508475838629877f37912da4637a3851b 100644 (file)
@@ -362,6 +362,8 @@ void silc_client_send_key_agreement(SilcClient client,
 
   if (!client_entry)
     return;
+  if (conn->internal->disconnected)
+    return;
 
   if (client_entry->internal.ke) {
     completion(client, conn, client_entry, SILC_KEY_AGREEMENT_ALREADY_STARTED,