@@ -56,11 +56,11 @@ #ifndef INVALID_SOCKET # define INVALID_SOCKET -1 #endif #if defined(OF_THREADS) && !defined(HAVE_THREADSAFE_GETADDRINFO) -# import "OFThread.h" +# import "OFMutex.h" # import "OFDataArray.h" static OFMutex *mutex = nil; #endif @@ -625,24 +625,16 @@ socklen_t addrLen; int newSock; newSocket = [[[[self class] alloc] init] autorelease]; addrLen = sizeof(*addr); - - @try { - addr = [newSocket allocMemoryWithSize: addrLen]; - } @catch (id e) { - [newSocket release]; - @throw e; - } + addr = [newSocket allocMemoryWithSize: addrLen]; if ((newSock = accept(sock, (struct sockaddr*)addr, - &addrLen)) == INVALID_SOCKET) { - [newSocket release]; + &addrLen)) == INVALID_SOCKET) @throw [OFAcceptFailedException exceptionWithClass: [self class] socket: self]; - } newSocket->sock = newSock; newSocket->sockAddr = addr; newSocket->sockAddrLen = addrLen;