From 4f322fd86678a71663c420e5c58b84dd35fd91ae Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Sun, 1 Nov 2015 20:51:26 +0100 Subject: [PATCH] Reduced CPU Usage --- ErgometerIPR/ErgometerApplication/MainClient.cs | 2 +- ErgometerIPR/ErgometerDoctorApplication/MainClient.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ErgometerIPR/ErgometerApplication/MainClient.cs b/ErgometerIPR/ErgometerApplication/MainClient.cs index 44e2683..06795c5 100644 --- a/ErgometerIPR/ErgometerApplication/MainClient.cs +++ b/ErgometerIPR/ErgometerApplication/MainClient.cs @@ -183,7 +183,7 @@ namespace ErgometerApplication { while(running) { - if(Doctor.Connected && Doctor.Available > 0) + if(Doctor.Connected) { NetCommand command = NetHelper.ReadNetCommand(Doctor); ParseCommand(command); diff --git a/ErgometerIPR/ErgometerDoctorApplication/MainClient.cs b/ErgometerIPR/ErgometerDoctorApplication/MainClient.cs index 74c08e7..106c5f7 100644 --- a/ErgometerIPR/ErgometerDoctorApplication/MainClient.cs +++ b/ErgometerIPR/ErgometerDoctorApplication/MainClient.cs @@ -123,7 +123,7 @@ namespace ErgometerDoctorApplication { while (running) { - if (loggedin && Server.Connected && Server.Available > 0) + if (loggedin && Server.Connected) { NetCommand command = NetHelper.ReadNetCommand(Server); HandleNetCommand(command);