fukamachi / clack

Web server abstraction layer for Common Lisp
MIT License
1.04k stars 86 forks source link

Correctly handle prematurely closed sockets in Hunchentoot handler #169

Closed MrLightningBolt closed 3 years ago

MrLightningBolt commented 3 years ago

Without this change, a condition exists wherein a client that closes a connection prematurely will cause a TYPE-ERROR condition when the Hunchentoot handler tries to write the 500 error to the now-NIL socket when :debug is false, with the result that (at least in SBCL) the worker thread becomes stuck. This change logs the error but allows normal processing to continue.

This seems to address the NIL stream issue in https://github.com/fukamachi/clack/pull/164

fukamachi commented 3 years ago

Thanks!