This commit is contained in:
@@ -290,18 +290,20 @@ class WebSocketRunner implements Runnable {
|
|||||||
@Override
|
@Override
|
||||||
public void failed(Throwable exc, ByteBuffer[] attachments) {
|
public void failed(Throwable exc, ByteBuffer[] attachments) {
|
||||||
writing.set(false);
|
writing.set(false);
|
||||||
|
futureResult.complete(RETCODE_SENDEXCEPTION);
|
||||||
|
closeRunner(RETCODE_SENDEXCEPTION, "websocket send message failed on CompletionHandler");
|
||||||
if (exc != null) {
|
if (exc != null) {
|
||||||
context.getLogger().log(Level.FINE, "WebSocket sendMessage on CompletionHandler failed, force to close channel, live " + (System.currentTimeMillis() - webSocket.getCreatetime()) / 1000 + " seconds", exc);
|
context.getLogger().log(Level.FINE, "WebSocket sendMessage on CompletionHandler failed, force to close channel, live " + (System.currentTimeMillis() - webSocket.getCreatetime()) / 1000 + " seconds", exc);
|
||||||
}
|
}
|
||||||
closeRunner(RETCODE_SENDEXCEPTION, "websocket send message failed on CompletionHandler");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception t) {
|
} catch (Exception t) {
|
||||||
writing.set(false);
|
writing.set(false);
|
||||||
context.getLogger().log(Level.FINE, "WebSocket sendMessage abort, force to close channel, live " + (System.currentTimeMillis() - webSocket.getCreatetime()) / 1000 + " seconds", t);
|
|
||||||
closeRunner(RETCODE_SENDEXCEPTION, "websocket send message failed on channel.write");
|
|
||||||
futureResult.complete(RETCODE_SENDEXCEPTION);
|
futureResult.complete(RETCODE_SENDEXCEPTION);
|
||||||
|
closeRunner(RETCODE_SENDEXCEPTION, "websocket send message failed on channel.write");
|
||||||
|
context.getLogger().log(Level.FINE, "WebSocket sendMessage abort, force to close channel, live " + (System.currentTimeMillis() - webSocket.getCreatetime()) / 1000 + " seconds", t);
|
||||||
|
|
||||||
}
|
}
|
||||||
return futureResult;
|
return futureResult;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user