@@ -167,10 +167,18 @@ { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFString *line; OFArray *split; OFString *action = nil; + + if (sock.atEndOfStream) { + if ([delegate respondsToSelector: + @selector(connectionWasClosed:)]) + [delegate connectionWasClosed: self]; + + return; + } @try { line = [sock tryReadLine]; } @catch (OFInvalidEncodingException *e) { line = [sock tryReadLineWithEncoding: