diff --git a/plugins/TcpSocketDataSender/TcpSocketManager.cs b/plugins/TcpSocketDataSender/TcpSocketManager.cs index 046cbfe6..8d38f15f 100644 --- a/plugins/TcpSocketDataSender/TcpSocketManager.cs +++ b/plugins/TcpSocketDataSender/TcpSocketManager.cs @@ -26,7 +26,7 @@ public virtual bool Connect() _tcpClient.Connect(IPAddress.Parse(ServerIp), ServerPort); _writer = new BinaryWriter(_tcpClient.GetStream()); } - catch (SocketException) + catch (Exception e) when (e is SocketException || e is InvalidOperationException) { //No server avaliable, or it is busy/full. return Connected = false;