Daniil Kirilyuk created QPID-8758:
-------------------------------------
Summary: [Broker-J] Ensure AMQP-over-WebSocket connections
terminate after an unanswered close
Key: QPID-8758
URL: https://issues.apache.org/jira/browse/QPID-8758
Project: Qpid
Issue Type: Bug
Components: Broker-J
Affects Versions: qpid-java-broker-10.1.0
Reporter: Daniil Kirilyuk
Assignee: Daniil Kirilyuk
Fix For: qpid-java-broker-10.1.1
AMQP-over-WebSocket connections may remain registered indefinitely when the
remote peer does not complete either the AMQP or WebSocket closing handshake.
When an AMQP connection begins closing, a ConnectionClosingTicker is added with
a deadline based on connection.closeResponseTimeout. After that deadline
expires, the ticker invokes ServerNetworkConnection.close().
For ordinary TCP connections, NonBlockingConnection.close() marks the
connection closed and wakes the selector, which proceeds with physical socket
teardown. For WebSocket connections, ConnectionWrapper.close() calls Jetty’s
Session.close(). This sends a WebSocket CLOSE frame and waits for the peer’s
CLOSE response.
The WebSocket provider disables Jetty idle-timeout processing when the session
opens:
{code:java}
session.setIdleTimeout(Duration.ZERO);
{code}
Consequently, if the peer becomes unreachable without sending FIN or RST or
simply does not answer the CLOSE frame, Jetty has no deadline that forces the
underlying connection to terminate. The connection remains in
WebSocketProvider._activeConnections.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]