Use new shutdown and send a fatal message.

This commit is contained in:
Tristan B. Kildaire 2020-05-15 16:06:40 +02:00
parent 71632ec1f3
commit 0b5ca124d6
1 changed files with 12 additions and 4 deletions

View File

@ -375,10 +375,15 @@ public final class BesterConnection : Thread
return Scope.UNKNOWN;
}
/* TODO: Implement me */
/**
* Sends an error message on fatal error.
* Used before client shutdown on such
* an error.
*/
private void sendFatalMessage()
{
/* TODO: Implement me */
}
/* Process the received message */
@ -413,8 +418,11 @@ public final class BesterConnection : Thread
/* TODO: Send message back about an invalid scope */
/* TODO: End this here */
isActive = false;
/* Send fatal message */
sendFatalMessage();
/* Stop the read/write loop */
shutdown();
return;
}
else if(scopeField == Scope.CLIENT)