diff libfdcore/peers.c @ 1190:f40de74bd1c7

Don't block PSM during failover
author Sebastien Decugis <sdecugis@freediameter.net>
date Mon, 10 Jun 2013 14:27:15 +0800
parents 56c36d1007b4
children d2608e47db28
line wrap: on
line diff
--- a/libfdcore/peers.c	Mon Jun 10 12:04:50 2013 +0800
+++ b/libfdcore/peers.c	Mon Jun 10 14:27:15 2013 +0800
@@ -242,7 +242,7 @@
 	/* Requeue all messages in the "out" queue */
 	while ( fd_fifo_tryget(peer->p_tosend, &m) == 0 ) {
 		fd_hook_call(HOOK_MESSAGE_FAILOVER, m, peer, NULL, fd_msg_pmdl_get(m));
-		CHECK_FCT_DO(fd_fifo_post(fd_g_outgoing, &m), 
+		CHECK_FCT_DO(fd_fifo_post_noblock(fd_g_outgoing, (void *)&m), 
 			{
 				/* fallback: destroy the message */
 				fd_hook_call(HOOK_MESSAGE_DROPPED, m, NULL, "Internal error: unable to requeue this message during failover process", fd_msg_pmdl_get(m));
"Welcome to our mercurial repository"