@@ -993,14 +993,17 @@ void *pool = objc_autoreleasePoolPush(); OFString *line; of_range_t range; @try { - line = [_socket readLine]; + line = [_socket tryReadLine]; } @catch (OFInvalidEncodingException *e) { @throw [OFInvalidServerReplyException exception]; } + + if (line == nil) + return 0; range = [line rangeOfString: @";"]; if (range.location != OF_NOT_FOUND) line = [line substringWithRange: of_range(0, range.location)];