don't try to close the socket if it's not there
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 28 Feb 2009 20:45:00 +0000 (20:45 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 28 Feb 2009 20:45:00 +0000 (20:45 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1669 9efc2488-bf62-4759-914b-345cdb29e865

src/perl/lib/OpenSRF/Transport/SlimJabber/XMPPReader.pm

index 086a7a6..9d10463 100644 (file)
@@ -136,6 +136,7 @@ sub connect {
 
 sub disconnect {
     my $self = shift;
+    return unless $self->socket;
     if($self->tcp_connected) {
         $self->send(JABBER_DISCONNECT); 
         shutdown($self->socket, 2);