From 59a56bca2ac4f4b2bee743edf73083f0f2afeb21 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sun, 11 Sep 2011 04:07:08 +0200 Subject: [PATCH] Correctly check return value of SSL_write. --- src/SSLSocket.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SSLSocket.m b/src/SSLSocket.m index 15bfec6..952711e 100644 --- a/src/SSLSocket.m +++ b/src/SSLSocket.m @@ -245,7 +245,7 @@ static SSL_CTX *ctx; @throw e; } - if (SSL_write(ssl, buffer, (int)length) < 1) + if (SSL_write(ssl, buffer, (int)length) < length) @throw [OFWriteFailedException newWithClass: isa stream: self requestedLength: length];