Handle closed connection.
FossilOrigin-Name: 4314708767bfb9f430a5e700e471993aa26c2d7bf0289982d82840dd55564d53
This commit is contained in:
parent
9d8593a138
commit
a73f2c9daa
3 changed files with 13 additions and 0 deletions
|
@ -70,6 +70,7 @@
|
||||||
inChannel: (IRCChannel*)channel;
|
inChannel: (IRCChannel*)channel;
|
||||||
- (void)connection: (IRCConnection*)connection
|
- (void)connection: (IRCConnection*)connection
|
||||||
didReceiveNamesForChannel: (IRCChannel*)channel;
|
didReceiveNamesForChannel: (IRCChannel*)channel;
|
||||||
|
- (void)connectionWasClosed: (IRCConnection*)connection;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface IRCConnection: OFObject
|
@interface IRCConnection: OFObject
|
||||||
|
|
|
@ -170,6 +170,14 @@
|
||||||
OFArray *split;
|
OFArray *split;
|
||||||
OFString *action = nil;
|
OFString *action = nil;
|
||||||
|
|
||||||
|
if (sock.atEndOfStream) {
|
||||||
|
if ([delegate respondsToSelector:
|
||||||
|
@selector(connectionWasClosed:)])
|
||||||
|
[delegate connectionWasClosed: self];
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@try {
|
@try {
|
||||||
line = [sock tryReadLine];
|
line = [sock tryReadLine];
|
||||||
} @catch (OFInvalidEncodingException *e) {
|
} @catch (OFInvalidEncodingException *e) {
|
||||||
|
|
|
@ -3,3 +3,7 @@ all:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.so *.dylib *.dll
|
rm -f *.o *.so *.dylib *.dll
|
||||||
|
|
||||||
|
install:
|
||||||
|
cp *.h /usr/local/include/ObjIRC/
|
||||||
|
cp libobjirc.dylib /usr/local/lib/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue