LuaSec 0.3.1

This commit is contained in:
Bruno Silvestre
2012-09-02 11:27:04 -03:00
parent 1c95a077ee
commit affd08cf05
8 changed files with 26 additions and 17 deletions

View File

@ -1,6 +1,6 @@
/*--------------------------------------------------------------------------
* LuaSec 0.3
* Copyright (C) 2006-2008 Bruno Silvestre
* LuaSec 0.3.1
* Copyright (C) 2006-2009 Bruno Silvestre
*
*--------------------------------------------------------------------------*/
@ -158,6 +158,9 @@ static int ssl_recv(void *ctx, char *data, size_t count, size_t *got,
case SSL_ERROR_NONE:
*got = err;
return IO_DONE;
case SSL_ERROR_ZERO_RETURN:
*got = err;
return IO_CLOSED;
case SSL_ERROR_WANT_READ:
err = socket_waitfd(&ssl->sock, WAITFD_R, tm);
if (err == IO_TIMEOUT) return IO_SSL;