lib/reel/websocket.rb in reel-0.4.0 vs lib/reel/websocket.rb in reel-0.5.0.pre
- old
+ new
@@ -77,10 +77,10 @@
end
def write(msg)
@socket << ::WebSocket::Message.new(msg).to_data
msg
- rescue Errno::EPIPE
+ rescue IOError, Errno::ECONNRESET, Errno::EPIPE
cancel_timer!
raise SocketError, "error writing to socket"
rescue
cancel_timer!
raise