Mercurial > hg > freeDiameter
changeset 1321:8288982c63b7
Log at different level if peer is closed after normal sequence or not
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Sun, 15 Oct 2017 20:59:46 +0800 |
parents | 949973661b25 |
children | 7800e6f1919f |
files | libfdcore/p_psm.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)),