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

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Oct 16 14:58:28 EDT 2007


Author: alexmv
Date: Tue Oct 16 14:58:28 2007
New Revision: 9329

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

Log:
 r23689 at zoq-fot-pik:  chmrr | 2007-10-16 14:58:14 -0400
  * Clean up for accept failures
  * Remove some debug statements


Modified: Net-Server-IMAP/lib/Net/Server/IMAP.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP.pm	Tue Oct 16 14:58:28 2007
@@ -66,11 +66,9 @@
                 if ( $fh == $lsn or (defined $ssl and $fh == $ssl)) {
 
                     # Create a new socket
-                    if (my $new = $fh->accept) {
-                        $self->accept_connection($new);
-                    } else {
-                        warn "Accept failed? $@\n";
-                    }
+                    my $new = $fh->accept;
+                    # Accept can fail; if so, ignore the connection
+                    $self->accept_connection($new) if $new;
                 } else {
 
                     # Process socket

Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm	Tue Oct 16 14:58:28 2007
@@ -139,7 +139,6 @@
         $self->untagged_response(
             "OK [" . uc($_) . "] " . $extra_responses{$_} );
     }
-    $self->log("OK Request: $message");
     $self->out( $self->command_id . " " . "OK " . $message . "\r\n" );
     return 1;
 }
@@ -152,7 +151,6 @@
         $self->untagged_response(
             "NO [" . uc($_) . "] " . $extra_responses{$_} );
     }
-    $self->log("NO Request: $message");
     $self->out( $self->command_id . " " . "NO " . $message . "\r\n" );
     return 0;
 }
@@ -178,7 +176,6 @@
 sub bad_command {
     my $self   = shift;
     my $reason = shift;
-    $self->log("BAD Request: $reason");
     $self->out( $self->command_id . " " . "BAD " . $reason . "\r\n" );
     return 0;
 }



More information about the Bps-public-commit mailing list