# HG changeset patch # User Sebastien Decugis # Date 1265705955 -32400 # Node ID 5ea550c3f033cb0ee6bf553a9283b0ad6a7ceafe # Parent 6a033f90d8ea6675f491095812ef4348ff775df6 Fix handling of long network failures diff -r 6a033f90d8ea -r 5ea550c3f033 freeDiameter/cnxctx.c --- a/freeDiameter/cnxctx.c Mon Feb 08 18:35:51 2010 +0900 +++ b/freeDiameter/cnxctx.c Tue Feb 09 17:59:15 2010 +0900 @@ -680,6 +680,9 @@ case GNUTLS_E_INTERRUPTED: if (!conn->cc_closing) goto again; + TRACE_DEBUG(INFO, "Connection is closing, so abord gnutls_record_recv now."); + ret = 0; + break; default: TRACE_DEBUG(INFO, "This TLS error is not handled, assume unrecoverable error"); diff -r 6a033f90d8ea -r 5ea550c3f033 freeDiameter/p_psm.c --- a/freeDiameter/p_psm.c Mon Feb 08 18:35:51 2010 +0900 +++ b/freeDiameter/p_psm.c Tue Feb 09 17:59:15 2010 +0900 @@ -665,8 +665,11 @@ CHECK_FCT_DO( fd_p_cnx_init(peer), goto psm_end ); goto psm_loop; + case STATE_SUSPECT: + /* Mark the connection problem */ + peer->p_flags.pf_cnx_pb = 1; + case STATE_CLOSING: - case STATE_SUSPECT: case STATE_WAITCNXACK: case STATE_WAITCEA: /* Destroy the connection, restart the timer to a new connection attempt */