summaryrefslogtreecommitdiff
path: root/ircobsbridge.rb
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@action.fairlystable.org>2017-08-20 21:54:12 -0700
committerJoe Rayhawk <jrayhawk@action.fairlystable.org>2017-08-20 21:54:12 -0700
commit0d192ad69d3c7c3261321efea9c83b75470fc408 (patch)
treeca487718f4c7d15e2f2cb35bd82cca75d7d78a6b /ircobsbridge.rb
parente0e8928fb82d811047d31a08515453e296ce087b (diff)
downloadtwitchtools-0d192ad69d3c7c3261321efea9c83b75470fc408.tar.gz
twitchtools-0d192ad69d3c7c3261321efea9c83b75470fc408.zip
ircobsbridge: add more exceptions for connection breakages
Diffstat (limited to 'ircobsbridge.rb')
-rw-r--r--ircobsbridge.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ircobsbridge.rb b/ircobsbridge.rb
index ace7de7..aa89577 100644
--- a/ircobsbridge.rb
+++ b/ircobsbridge.rb
@@ -29,7 +29,7 @@ end
def websocketwrite( json )
$tcp_socket.write( WebSocket::Frame::Outgoing::Client.new( data: json, type: :text ).to_s )
-rescue IOError, EOFError
+rescue IOError, EOFError, Errno::ECONNRESET
$tcp_socket.close
websocket_create()
retry
@@ -192,7 +192,7 @@ obsreader = Thread.new {
rescue IO::WaitReadable, IO::EAGAINWaitReadable, JSON::ParserError
IO.select([$tcp_socket])
retry
- rescue IOError, EOFError
+ rescue IOError, EOFError, Errno::ECONNRESET
$tcp_socket.close
websocket_create()
retry