Use -[pendingBytes] of the superclass if we have no SSL context.

This happens if we are a listening socket.
This commit is contained in:
Jonathan Schleifer 2011-10-22 17:46:02 +02:00
parent 6ed58f5e6e
commit af7fcc1aa4

View file

@ -259,6 +259,9 @@ static SSL_CTX *ctx;
- (size_t)pendingBytes - (size_t)pendingBytes
{ {
if (ssl == NULL)
return [super pendingBytes];
return [super pendingBytes] + SSL_pending(ssl); return [super pendingBytes] + SSL_pending(ssl);
} }