Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Commit

Permalink
Merge pull request #105 from Asmod4n/patch-3
Browse files Browse the repository at this point in the history
Raise SocketError on all possible Socket Errors
  • Loading branch information
tarcieri committed Sep 27, 2013
2 parents ea7124b + db25be7 commit 74c5aeb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reel/stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def call(socket)
def write(data)
@socket << data
data
rescue Errno::EPIPE
rescue IOError, Errno::ECONNRESET, Errno::EPIPE
raise SocketError, "error writing to socket"
end
alias :<< :write
Expand Down
2 changes: 1 addition & 1 deletion lib/reel/websocket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def body
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
Expand Down

0 comments on commit 74c5aeb

Please sign in to comment.