[poe-commits] poe/POE/Component/Server TCP.pm,1.39,1.40
Brought to you by:
rcaputo
From: <rc...@us...> - 2003-10-29 23:51:01
|
Update of /cvsroot/poe/poe/POE/Component/Server In directory sc8-pr-cvs1:/tmp/cvs-serv28774/POE/Component/Server Modified Files: TCP.pm Log Message: Various Disconnect callbacks weren't actually called when a remote end disconnected while the local end had output for it. This was a side effect of {Client,Server}::TCP's helpful flush-before-disconect code. Unfortunately, the components didn't account for the fact that the remote end might not be there. "Apocalypse" discovered this condition during load testing and was nice enough to track it down. Thanks! The other two files have whitespace changes. Darn CVS for wanting to commit them, but what can y'do? Index: TCP.pm =================================================================== RCS file: /cvsroot/poe/poe/POE/Component/Server/TCP.pm,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** TCP.pm 16 Sep 2003 14:50:12 -0000 1.39 --- TCP.pm 29 Oct 2003 23:50:58 -0000 1.40 *************** *** 186,189 **** --- 186,190 ---- $client_error->(@_); if ($_[HEAP]->{shutdown_on_error}) { + $_[HEAP]->{got_an_error} = 1; $_[KERNEL]->yield("shutdown"); } *************** *** 202,206 **** $heap->{shutdown} = 1; if (defined $heap->{client}) { ! unless ($heap->{client}->get_driver_out_octets()) { $client_disconnected->(@_); delete $heap->{client}; --- 203,210 ---- $heap->{shutdown} = 1; if (defined $heap->{client}) { ! if ( ! $heap->{got_an_error} or ! not $heap->{client}->get_driver_out_octets() ! ) { $client_disconnected->(@_); delete $heap->{client}; |