From 19ad65ed781d88990305da39c5ef91070b5d462b Mon Sep 17 00:00:00 2001 From: sheychen Date: Fri, 18 Nov 2016 10:40:07 +0100 Subject: [PATCH] Resolve client crash on request to closed server --- Galactic Colors Control/Program.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Galactic Colors Control/Program.cs b/Galactic Colors Control/Program.cs index fce2ec9..6e7e0b3 100644 --- a/Galactic Colors Control/Program.cs +++ b/Galactic Colors Control/Program.cs @@ -227,16 +227,16 @@ namespace Galactic_Colors_Control /// Send success private bool Send(Data packet) { - //try - //{ + try + { ClientSocket.Send(packet.ToBytes()); return true; - /*} + } catch //Can't contact server { _errorCount++; } - return false;*/ + return false; } ///