-
-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
Description
lucky/src/lucky/text_response.cr
Line 32 in 35309ac
| context.response.print body |
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 '->'
Reactions are currently unavailable