Check PROTOCOL_FAILURE as well in the connect_to_server_*
authorPekka Riikonen <priikone@silcnet.org>
Fri, 2 Feb 2001 21:20:01 +0000 (21:20 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 2 Feb 2001 21:20:01 +0000 (21:20 +0000)
routines.

lib/silcclient/client.c

index c5382e2fe1abe0171640f3a261e45e16b816a669..d63e09107d9c16d08a24bdd73fd2a7bc4113a48c 100644 (file)
@@ -379,7 +379,8 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_second)
 
   SILC_LOG_DEBUG(("Start"));
 
-  if (protocol->state == SILC_PROTOCOL_STATE_ERROR) {
+  if (protocol->state == SILC_PROTOCOL_STATE_ERROR ||
+      protocol->state == SILC_PROTOCOL_STATE_FAILURE) {
     /* Error occured during protocol */
     SILC_LOG_DEBUG(("Error during KE protocol"));
     silc_protocol_free(protocol);
@@ -450,7 +451,8 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_final)
 
   SILC_LOG_DEBUG(("Start"));
 
-  if (protocol->state == SILC_PROTOCOL_STATE_ERROR) {
+  if (protocol->state == SILC_PROTOCOL_STATE_ERROR ||
+      protocol->state == SILC_PROTOCOL_STATE_FAILURE) {
     /* Error occured during protocol */
     SILC_LOG_DEBUG(("Error during authentication protocol"));
     silc_protocol_free(protocol);