Handle closed connection.

FossilOrigin-Name: 4314708767bfb9f430a5e700e471993aa26c2d7bf0289982d82840dd55564d53
This commit is contained in:
Jonathan Schleifer 2012-02-16 14:56:10 +00:00
parent 9d8593a138
commit a73f2c9daa
3 changed files with 13 additions and 0 deletions

View file

@ -170,6 +170,14 @@
OFArray *split;
OFString *action = nil;
if (sock.atEndOfStream) {
if ([delegate respondsToSelector:
@selector(connectionWasClosed:)])
[delegate connectionWasClosed: self];
return;
}
@try {
line = [sock tryReadLine];
} @catch (OFInvalidEncodingException *e) {