Index: src/SSLSocket.m ================================================================== --- src/SSLSocket.m +++ src/SSLSocket.m @@ -217,15 +217,13 @@ isAtEndOfStream = YES; return ret; } -- (size_t)_writeNBytes: (size_t)length - fromBuffer: (const char*)buffer +- (void)_writeNBytes: (size_t)length + fromBuffer: (const char*)buffer { - ssize_t ret; - if (length > INT_MAX) @throw [OFOutOfRangeException newWithClass: isa]; if (sock == INVALID_SOCKET) @throw [OFNotConnectedException newWithClass: isa @@ -245,16 +243,14 @@ #endif @throw e; } - if ((ret = SSL_write(ssl, buffer, (int)length)) < 1) + if (SSL_write(ssl, buffer, (int)length) < 1) @throw [OFWriteFailedException newWithClass: isa stream: self requestedLength: length]; - - return ret; } - (size_t)pendingBytes { return [super pendingBytes] + SSL_pending(ssl);