cloudflare / keyless

Cloudflare's Keyless SSL Server Reference Implementation
Other
275 stars 80 forks source link

Handle all errors in the read_cb and terminate connection #41

Closed jgrahamc closed 10 years ago

jgrahamc commented 10 years ago

Previously, we were only checking for UV_EOF. But if an error occurred other than UV_EOF it was possible for us to continue reading from the connection and end up terminating the kssl_server with a libuv exception:

uv_read: Assertion `!uv_io_active(&stream->io_watcher, 1)
&& "stream->read_cb(status=-1) did not call uv_close()"'

(Internal CloudFlare note: this is KEY-12)