<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2></FONT>Hey there Jabber-folks ...</DIV>
<DIV> </DIV>
<DIV>I have had a problem with my transport server crashing when a client is
killed without cleanly disconnecting from the socket first ... i.e. I control-c
the rug out from underneath the carpet of my client app, so it doesn't get to
send its logout message & do a socket close. The read() call in io.c
fails and h_err() kills my transport.</DIV>
<DIV> </DIV>
<DIV>A small little fix takes care of this for me ... so I thought I'd mail it
in & see if it helped out anyone else as well.</DIV>
<DIV> </DIV>
<DIV><STRONG><U>io.c:</U></STRONG></DIV>
<DIV>diff io.c io.c.new<BR>1a2<BR>> #include
<errno.h><BR>83c84,85<BR><
h_err(nbytes,"read");<BR>---<BR>>
if(errno !=
ECONNRESET)<BR>>
h_err(nbytes,"read");<BR></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2>This way if the connection was killed, then
read() failing & returning -1 lets us "drop the connection" (and
the user session) cleanly on our side.</FONT></DIV>
<DIV> </DIV>
<DIV>---------------------------------------------------------------------------------------------------------<BR>Scott
Perrine
ph: 415.777.9641<BR>Xuma Technologies
LLC
<A href="http://www.xuma.com">http://www.xuma.com</A><BR>World Class Engineering
For
E-Business<BR>---------------------------------------------------------------------------------------------------------</DIV></BODY></HTML>