You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This raises IO::Error if the client has gone away and there is no longer a valid socket to write to. It should catch IO::Error and simply log that the client went away before the response could be sent. Perhaps the error should be handled in HTTP::Server rather than Lucky. The backtrace is:
▸ Rendered Page::Search::Product::Result
▸ IO::Error
Error writing to socket: Broken pipe
Backtrace
/usr/share/crystal/src/io/evented.cr:82:13 in 'unbuffered_write'
/usr/share/crystal/src/io/buffered.cr:152:14 in 'write'
/usr/share/crystal/src/http/server/response.cr:223:11 in 'unbuffered_write'
/usr/share/crystal/src/io/buffered.cr:152:14 in 'write'
/usr/share/crystal/src/http/server/response.cr:86:7 in 'write'
/usr/share/crystal/src/io/memory.cr:412:5 in 'to_s'
/usr/share/crystal/src/io.cr:174:5 in '<<'
/usr/share/crystal/src/io.cr:188:5 in 'print'
lib/lucky/src/lucky/text_response.cr:32:5 in 'print'
lib/lucky/src/lucky/renderable.cr:145:5 in 'handle_response'
lib/lucky/src/lucky/renderable.cr:140:5 in 'perform_action'
lib/lucky/src/lucky/route_handler.cr:10:7 in 'call'
/usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
/usr/share/crystal/src/http/server.cr:515:5 in 'handle_client'
/usr/share/crystal/src/http/server.cr:468:13 in '->'
/usr/share/crystal/src/primitives.cr:266:3 in 'run'
/usr/share/crystal/src/fiber.cr:92:34 in '->'
The text was updated successfully, but these errors were encountered:
I've been trying to find this error for a long time! crystal-lang/crystal#9065 Thanks for tracking it down!
I'm not sure where the actual error should be fixed, but I guess if we just catch IO::Error, maybe that's good enough for now? What do other frameworks do in this situation?
lucky/src/lucky/text_response.cr
Line 32 in 35309ac
This raises IO::Error if the client has gone away and there is no longer a valid socket to write to. It should catch IO::Error and simply log that the client went away before the response could be sent. Perhaps the error should be handled in HTTP::Server rather than Lucky. The backtrace is:
The text was updated successfully, but these errors were encountered: