@@ -326,11 +326,11 @@ if (listen(sock, backlog) == -1) @throw [OFListenFailedException newWithClass: isa socket: self backLog: backlog]; - listening = YES; + isListening = YES; } - (void)listen { if (sock == INVALID_SOCKET) @@ -340,11 +340,11 @@ if (listen(sock, 5) == -1) @throw [OFListenFailedException newWithClass: isa socket: self backLog: 5]; - listening = YES; + isListening = YES; } - (OFTCPSocket*)accept { OFTCPSocket *newsock; @@ -426,16 +426,21 @@ #endif /* Get rid of a warning, never reached anyway */ assert(0); } + +- (BOOL)isListening +{ + return isListening; +} - (void)close { [super close]; - listening = NO; + isListening = NO; [self freeMemory: sockAddr]; sockAddr = NULL; sockAddrLen = 0; } @end