Neopallium/lua-handlers — pull request #9 by kalkbrenner (2014-11-06 12:32:19+00:00)
Title: fixed problem when tls backend blocks on sending data which caused conne...

...ction close

This is easily reproducable.
Serve a file > 200kb via https static fileserver example (should also make that problem), then the client does not receive the whole file.

When debugging i found that in tls_backend.lua, sock_send_data when the error happenes num is 0 (not false) but errno is set to SSL_ERROR_WANT_WRITE (like described at the notes in https://www.openssl.org/docs/ssl/SSL_write.html#).

I have added the errno check and now the problem is reproducable gone here.