Jan Krakora created WICKET-6106:
-----------------------------------
Summary: Propagate JSR 356 WebSocket connection error to a page
Key: WICKET-6106
URL: https://issues.apache.org/jira/browse/WICKET-6106
Project: Wicket
Issue Type: Improvement
Components: wicket-native-websocket
Affects Versions: 7.2.0
Reporter: Jan Krakora
Assignee: Martin Grigorov
When something goes wrong with a WebSocket connection, Wicket just logs that at
{{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onError}}.
Then {{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onClose}} is called.
This would normally inform any component on a page that is boud to the
connection about closing the connection...but only if the connection is not in
closed state. That state is set by the servlet container and it coud be set
before calling {{org.apache.wicket.protocol.ws.javax.WicketEndpoint.onClose}}.
If a client of the wicket's WebSocket API need to know when a connection is
closed, there is no chance in the scenario above.
I would suggest to propagate onError the same way as onClose and let the
AbstractWebSocketProcessor broadcast those two type of message even if the
connection is closed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)