# HG changeset patch # User Sebastien Decugis # Date 1508072386 -28800 # Node ID 8288982c63b7581e6df39439df4f1605fcbf0e1f # Parent 949973661b25c0930a0fae6fb6e0bdd98d0ea543 Log at different level if peer is closed after normal sequence or not diff -r 949973661b25 -r 8288982c63b7 libfdcore/p_psm.c --- a/libfdcore/p_psm.c Thu Feb 16 16:06:08 2017 +0100 +++ b/libfdcore/p_psm.c Sun Oct 15 20:59:46 2017 +0800 @@ -885,7 +885,12 @@ goto psm_loop; psm_end: - LOG_E("%s: Going to ZOMBIE state (no more activity)", peer->p_hdr.info.pi_diamid); + cur_state = fd_peer_getstate(peer); + if ((cur_state == STATE_CLOSING) || (cur_state == STATE_CLOSING_GRACE)) { + LOG_N("%s: Going to ZOMBIE state (no more activity) after normal shutdown", peer->p_hdr.info.pi_diamid); + } else { + LOG_E("%s: Going to ZOMBIE state (no more activity) after abnormal shutdown", peer->p_hdr.info.pi_diamid); + } fd_psm_cleanup(peer, 1); TRACE_DEBUG(INFO, "'%s'\t-> 'STATE_ZOMBIE' (terminated)\t'%s'", STATE_STR(fd_peer_getstate(peer)),