diff --git a/IotWeb NET45/SocketServer.cs b/IotWeb NET45/SocketServer.cs index 7ab0615..2ad0ce3 100644 --- a/IotWeb NET45/SocketServer.cs +++ b/IotWeb NET45/SocketServer.cs @@ -110,10 +110,17 @@ public void Start() catch (Exception) { // Quietly consume the exception + } + // Finally, we can close the socket + try + { + client.Shutdown(SocketShutdown.Both); + client.Close(); + } + catch(Exception) + { + // Quietly eat the exception } - // Finally, we can close the socket - client.Shutdown(SocketShutdown.Both); - client.Close(); }); } }