Skip to content

Commit 029c445

Browse files
committed
Update SSLWrapper's 'append'.
1 parent fb75059 commit 029c445

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/protocol/SSLWrapper.cc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,13 @@ int SSLWrapper::append_message()
203203
} while (nleft > 0);
204204
}
205205

206-
if (ret < 0)
206+
ret = SSL_get_error(this->ssl, ret);
207+
if (ret != SSL_ERROR_WANT_READ)
207208
{
208-
ret = SSL_get_error(this->ssl, ret);
209-
if (ret != SSL_ERROR_WANT_READ)
210-
{
211-
if (ret != SSL_ERROR_SYSCALL)
212-
errno = -ret;
209+
if (ret != SSL_ERROR_SYSCALL)
210+
errno = -ret;
213211

214-
return -1;
215-
}
212+
return -1;
216213
}
217214

218215
return 0;

0 commit comments

Comments
 (0)