@Override public void destroy() { if (connection != null) { try { connection.close(); } catch (Exception e) { log.error(sm.getString("wsHttpUpgradeHandler.destroyFailed"), e); } } }
@Override public void close() { try { tyrusHttpUpgradeHandler.getWebConnection().close(); } catch (Exception e) { // do nothing. } } }
@Override public void close(CloseReason reason) { try { TyrusHttpUpgradeHandler.this.getWebConnection().close(); } catch (Exception e) { LOGGER.log(Level.FINE, e.getMessage(), e); } } });
@Override public void destroy() { if (connection != null) { try { connection.close(); } catch (Exception e) { log.error(sm.getString("wsHttpUpgradeHandler.destroyFailed"), e); } } }
@Override public void destroy() { if (connection != null) { try { connection.close(); } catch (Exception e) { log.error(sm.getString("wsHttpUpgradeHandler.destroyFailed"), e); } } }
@Override public void destroy() { if (connection != null) { try { connection.close(); } catch (Exception e) { log.error(sm.getString("wsHttpUpgradeHandler.destroyFailed"), e); } } }
private void close(int closeCode, String closeReason) { if (!closed) { try { connection.close(new CloseReason(CloseReason.CloseCodes.getCloseCode(closeCode), closeReason)); closed = true; wc.close(); } catch (Exception e) { LOGGER.log(Level.CONFIG, e.getMessage(), e); } } }
private void httpSessionForcedClose(int closeCode, String closeReason) { if (!closed) { try { // TODO // initiates connection close without sending close frame to the client - session is already invalidated // so we should not send anything. // ((TyrusWebSocket) ((TyrusWebSocketEngine) engine).getWebSocketHolder(writer).webSocket).setClosed(); connection.close(new CloseReason(CloseReason.CloseCodes.getCloseCode(closeCode), closeReason)); closed = true; wc.close(); } catch (Exception e) { LOGGER.log(Level.CONFIG, e.getMessage(), e); } } }
if (isUpgrade && wc != null) { try { wc.close(); } catch (Exception ignored) {