@@ -312,10 +312,12 @@ @throw [OFNotConnectedException newWithClass: isa]; if (listen(sock, backlog) == -1) @throw [OFListenFailedException newWithClass: isa backLog: backlog]; + + listening = YES; } - (void)listen { if (sock == INVALID_SOCKET) @@ -322,10 +324,12 @@ @throw [OFNotConnectedException newWithClass: isa]; if (listen(sock, 5) == -1) @throw [OFListenFailedException newWithClass: isa backLog: 5]; + + listening = YES; } - (OFTCPSocket*)accept { OFTCPSocket *newsock; @@ -413,10 +417,12 @@ if (sock == INVALID_SOCKET) @throw [OFNotConnectedException newWithClass: isa]; close(sock); sock = INVALID_SOCKET; + listening = NO; + eos = NO; [self freeMemory: sockAddr]; sockAddr = NULL; sockAddrLen = 0; }