celluloid / reel

UNMAINTAINED: See celluloid/celluloid#779 - Celluloid::IO-powered web server
https://celluloid.io
MIT License
596 stars 87 forks source link

fix TimeClient crash on page refresh #71

Closed victorklos closed 11 years ago

victorklos commented 11 years ago

When a client refreshes the page, the websocket is reconnected and the old one becomes stale. The next time notification causes the server to write to an invalid pipe, resulting in Errno::EPIPE. That exception is caught now, letting the client terminate gently.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling a787b6d561e3b8a1a8d06e365d093db915b47b7d on victorklos:master into 6732f22d920d45410f0df4af1469f8adac55681a on celluloid:master.

tarcieri commented 11 years ago

I'm thinking it would make more sense for Reel to catch this and reraise Reel::SocketError

victorklos commented 11 years ago

That would indeed make more sense. When will I learn not to "fix" stuff late in the evening? :-) Will get to it asap, thanks for your feedback

tarcieri commented 11 years ago

EPIPE should now be handled correctly