mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
SocketHookManager fix
This commit is contained in:
parent
4d7234512c
commit
cf5867c131
1 changed files with 12 additions and 11 deletions
|
@ -117,18 +117,19 @@ public void run() {
|
|||
context.type = handshake.type;
|
||||
|
||||
// Start response
|
||||
socketHookManager.preHook(context);
|
||||
try {
|
||||
respond(handshake.type, input, output, handshake.session, context.ip);
|
||||
socketHookManager.postHook(context);
|
||||
} catch (RequestException e) {
|
||||
if(server.socketHookManager.errorHook(context,e))
|
||||
{
|
||||
LogHelper.subDebug(String.format("#%d Request error: %s", handshake.session, e.getMessage()));
|
||||
if(e.getMessage() == null) LogHelper.error(e);
|
||||
output.writeString(e.getMessage(), 0);
|
||||
if(socketHookManager.preHook(context))
|
||||
{
|
||||
try {
|
||||
respond(handshake.type, input, output, handshake.session, context.ip);
|
||||
socketHookManager.postHook(context);
|
||||
} catch (RequestException e) {
|
||||
if(server.socketHookManager.errorHook(context,e))
|
||||
{
|
||||
LogHelper.subDebug(String.format("#%d Request error: %s", handshake.session, e.getMessage()));
|
||||
if(e.getMessage() == null) LogHelper.error(e);
|
||||
output.writeString(e.getMessage(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
savedError = e;
|
||||
|
|
Loading…
Reference in a new issue