@@ -642,12 +642,18 @@ didAcceptSocket: (OFTCPSocket*)clientSocket exception: (OFException*)exception { OFHTTPServer_Connection *connection; - if (exception != nil) + if (exception != nil) { + if ([delegate respondsToSelector: + @selector(server:didReceiveExceptionOnListeningSocket:)]) + return [delegate server: self + didReceiveExceptionOnListeningSocket: exception]; + return NO; + } connection = [[[OFHTTPServer_Connection alloc] initWithSocket: clientSocket server: self] autorelease];