[Opensrf-commits] r1317 - trunk/src/perlmods/OpenSRF/Transport/SlimJabber

svn at svn.open-ils.org svn at svn.open-ils.org
Wed May 7 10:40:54 EDT 2008


Author: erickson
Date: 2008-05-07 10:40:50 -0400 (Wed, 07 May 2008)
New Revision: 1317

Modified:
   trunk/src/perlmods/OpenSRF/Transport/SlimJabber/XMPPReader.pm
Log:
checking socket connect state before sending final packet and calling shutdown (to prevent warnings)

Modified: trunk/src/perlmods/OpenSRF/Transport/SlimJabber/XMPPReader.pm
===================================================================
--- trunk/src/perlmods/OpenSRF/Transport/SlimJabber/XMPPReader.pm	2008-04-23 00:17:25 UTC (rev 1316)
+++ trunk/src/perlmods/OpenSRF/Transport/SlimJabber/XMPPReader.pm	2008-05-07 14:40:50 UTC (rev 1317)
@@ -136,8 +136,10 @@
 
 sub disconnect {
     my $self = shift;
-    $self->send(JABBER_DISCONNECT); 
-    shutdown($self->socket, 2);
+    if($self->tcp_connected) {
+        $self->send(JABBER_DISCONNECT); 
+        shutdown($self->socket, 2);
+    }
     close($self->socket);
 }
 



More information about the opensrf-commits mailing list