From d8c198c24dac95e641991bdfffb86f35158783f5 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 28 Nov 2022 17:29:11 +0100 Subject: [PATCH] main.go: in readerLoop() also switch to RS_CONNECT state on shipclient.ErrNotConnected error. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 5d1a5b1..6d77cc1 100644 --- a/main.go +++ b/main.go @@ -81,7 +81,7 @@ func readerLoop() { if shErr, ok := err.(shipclient.ShipClientError); ok { // Reconnect - if shErr.Type == shipclient.ErrSockRead { + if shErr.Type == shipclient.ErrSockRead || shErr.Type == shipclient.ErrNotConnected { state = RS_CONNECT } }