@Override public void onTransportClosed(Event event) { if(event.getTransport() != null) { event.getTransport().unbind(); } } }
@Override public void onTransportClosed(Event event) { final Transport transport = event.getTransport(); final Connection connection = event.getConnection(); if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format(Locale.US, "onTransportClosed hostname[%s]", (connection != null ? connection.getHostname() : "n/a"))); } if (transport != null && connection != null && connection.getTransport() != null) { transport.unbind(); } } }
@Override public void onConnectionLocalClose(Event event) { final Connection connection = event.getConnection(); final ErrorCondition error = connection.getCondition(); if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format(Locale.US, "onConnectionLocalClose: hostname[%s], errorCondition[%s], errorDescription[%s]", connection.getHostname(), error != null ? error.getCondition() : "n/a", error != null ? error.getDescription() : "n/a")); } if (connection.getRemoteState() == EndpointState.CLOSED) { // This means that the CLOSE origin is Service final Transport transport = connection.getTransport(); if (transport != null) { transport.unbind(); // we proactively dispose IO even if service fails to close } } }
private void handleSocketEnd(Void arg) { transport.unbind(); transport.close(); if (this.netClient != null) { this.netClient.close(); } else { this.socket.close(); } ((ProtonConnectionImpl) this.connection.getContext()).fireDisconnect(); }
@Override public void onTransportError(Event event) { final Connection connection = event.getConnection(); final Transport transport = event.getTransport(); final ErrorCondition condition = transport.getCondition(); if (TRACE_LOGGER.isWarnEnabled()) { TRACE_LOGGER.warn(String.format(Locale.US, "onTransportError: hostname[%s], error[%s]", connection != null ? connection.getHostname() : "n/a", condition != null ? condition.getDescription() : "n/a")); } if (connection != null && connection.getRemoteState() != EndpointState.CLOSED) { // if the remote-peer abruptly closes the connection without issuing close frame // issue one this.amqpConnection.onConnectionError(condition); } // onTransportError event is not handled by the global IO Handler for cleanup transport.unbind(); this.notifyTransportErrors(event); }
@Override public void onConnectionLocalClose(Event event) { Connection connection = event.getConnection(); TRACE_LOGGER.debug("onConnectionLocalClose: hostname:{}", connection.getHostname()); if(connection.getRemoteState() == EndpointState.CLOSED) { // Service closed it first. In some such cases transport is not unbound and causing a leak. if(connection.getTransport() != null) { connection.getTransport().unbind(); } connection.free(); } } }
break; case TRANSPORT_CLOSED: event.getTransport().unbind(); break; case REACTOR_QUIESCED:
break; case TRANSPORT_CLOSED: event.getTransport().unbind(); break; case REACTOR_QUIESCED: