Core/RemoteAccess: Fixes high cpu when closing the telnet client without using the exit command.
This commit is contained in:
@@ -127,7 +127,10 @@ namespace Game.Networking
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
int bytes = _socket.Receive(_receiveBuffer);
|
int bytes = _socket.Receive(_receiveBuffer);
|
||||||
str = String.Concat(str, Encoding.UTF8.GetString(_receiveBuffer, 0, bytes));
|
if (bytes == 0)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
str = string.Concat(str, Encoding.UTF8.GetString(_receiveBuffer, 0, bytes));
|
||||||
}
|
}
|
||||||
while (!str.Contains("\n"));
|
while (!str.Contains("\n"));
|
||||||
|
|
||||||
@@ -195,7 +198,7 @@ namespace Game.Networking
|
|||||||
bool ProcessCommand(string command)
|
bool ProcessCommand(string command)
|
||||||
{
|
{
|
||||||
if (command.Length == 0)
|
if (command.Length == 0)
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
Log.outInfo(LogFilter.CommandsRA, $"Received command: {command}");
|
Log.outInfo(LogFilter.CommandsRA, $"Received command: {command}");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user