From 0d192ad69d3c7c3261321efea9c83b75470fc408 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Sun, 20 Aug 2017 21:54:12 -0700 Subject: ircobsbridge: add more exceptions for connection breakages --- ircobsbridge.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ircobsbridge.rb') 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 -- cgit v1.2.3