changeset 1274:681e8e55af27

Allow routing messages in state CLOSING_GRACE. Otherwise, replies can't get out, defeating the purpose of CLOSING_GRACE.
author Thomas Klausner <tk@giga.or.at>
date Mon, 28 Jul 2014 16:02:51 +0200
parents e831cabceab0
children 62bd95182f6d
files libfdcore/routing_dispatch.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/routing_dispatch.c	Fri May 23 16:08:04 2014 +0200
+++ b/libfdcore/routing_dispatch.c	Mon Jul 28 16:02:51 2014 +0200
@@ -878,7 +878,7 @@
 
 		/* Find the peer corresponding to this name */
 		CHECK_FCT( fd_peer_getbyid( qry_src, qry_src_len, 0, (void *) &peer ) );
-		if (fd_peer_getstate(peer) != STATE_OPEN) {
+		if (fd_peer_getstate(peer) != STATE_OPEN && fd_peer_getstate(peer) != STATE_CLOSING_GRACE) {
 			char buf[128];
 			snprintf(buf, sizeof(buf), "Unable to forward answer to deleted / closed peer '%s'.", qry_src);
 			fd_hook_call(HOOK_MESSAGE_ROUTING_ERROR, msgptr, NULL, buf, fd_msg_pmdl_get(msgptr));
"Welcome to our mercurial repository"