Skip to content

Commit

Permalink
Fix: trying to get stream for non-existing or time-outed connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Mar 5, 2019
1 parent f7a3304 commit ad3cc75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/TcpSocketDataSender/TcpSocketManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ad3cc75

Please sign in to comment.