From 125216b0eaf530141a6e74aea8ffd9d378858dee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Wed, 18 Feb 2009 18:07:45 +0000 Subject: [PATCH] clean up notification pool even if interlogger connection is broken in middle of message --- org.glite.lb.client/src/notification.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/org.glite.lb.client/src/notification.c b/org.glite.lb.client/src/notification.c index 1296337..b0d3849 100644 --- a/org.glite.lb.client/src/notification.c +++ b/org.glite.lb.client/src/notification.c @@ -697,7 +697,8 @@ start: if ( (ret = read_data(ctx)) ) { ctx->connNotif->connPool[ctx->connNotif->connToUse].bufPtr = 0; - if ( (ret == ENOTCONN) && (ctx->connNotif->connPool[ctx->connNotif->connToUse].bufUse == 0) ) { + if ( ret == ENOTCONN ) { + int broken = (ctx->connNotif->connPool[ctx->connNotif->connToUse].bufUse != 0); /* IL closed connection; remove this connection from pool and go to poll if timeout > 0 */ CloseConnectionNotif(ctx); @@ -712,8 +713,12 @@ start: start_time = check_time; fd_num--; - edg_wll_ResetError(ctx); + if (broken) { + edg_wll_SetError(ctx,ENOTCONN,"IL connection broken in middle of message"); + goto err; + } + edg_wll_ResetError(ctx); goto start; } -- 1.8.2.3