From 87d3f802072a338f0aa81d1e9108ab2f2d3092e6 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sun, 25 May 2008 00:06:15 +0000 Subject: [PATCH] -Correct problem where lazy clients would induce 'unexpected disconnects'. Lazy clients here consisting of the awk scripts that don't wait for serverdone tag. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1488 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/sbin/xcatd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 9ceecc75a..0ba1c397e 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -736,7 +736,13 @@ sub plugin_command { if ($req->{transid}) { $done{transid}=$req->{transid}->[0]; } - if ($sock) { print $sock XMLout(\%done,RootName => 'xcatresponse',NoAttr=>1); } + if ($sock) { + my $clientpresence = new IO::Select; #The client may have gone away without confirmation, don't PIPE over this trivial thing + $clientpresence->add($sock); + if ($clientpresence->can_write) { + print $sock XMLout(\%done,RootName => 'xcatresponse',NoAttr=>1); + } + } } my $dispatch_dnf=0;