[Bps-public-commit] r9324 - in Net-Server-IMAP: lib/Net/Server/IMAP

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Oct 16 12:39:13 EDT 2007


Author: alexmv
Date: Tue Oct 16 12:39:12 2007
New Revision: 9324

Modified:
   Net-Server-IMAP/   (props changed)
   Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm

Log:
 r23671 at zoq-fot-pik:  chmrr | 2007-10-16 12:37:41 -0400
  * Bulletproof a bit so we don't die if the handle went away


Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Connection.pm	Tue Oct 16 12:39:12 2007
@@ -127,8 +127,14 @@
 sub out {
     my $self = shift;
     my $msg  = shift;
-    $self->io_handle->print($msg);
-    $self->log("S: $msg");
+
+    if ($self->io_handle) {
+        $self->io_handle->print($msg);
+        $self->log("S: $msg");
+    } else {
+        warn "Connection closed unexpectedly\n";
+    }
+
 }
 
 1;



More information about the Bps-public-commit mailing list