False alarm, sorry for the noise under Tomcat the issue is solved by changing WsServerContainer::defaultMaxSessionIdleTimeout, most probably Jetty has similar setting
On Sun, 10 Feb 2019 at 08:02, Maxim Solodovnik <[email protected]> wrote: > > Thanks for the answer Martin, > > On Sun, 10 Feb 2019 at 04:27, Martin Grigorov <[email protected]> wrote: > > > > Hi Maxim, > > > > > > On Sat, Feb 9, 2019 at 6:51 PM Maxim Solodovnik <[email protected]> > > wrote: > > > > > Hello All, > > > > > > I just have noticed WebSocketBehavior::onClose/onError is not being > > > called in case of network connection is lost (Tested in Tomcat and > > > Jetty) > > > > > > > I.e. Tomcat/Jetty do not call javax.websocket.Session#close() at all ? > > According to my tests yes :( > The scenario is: > 1) Start simple application (tried Tomcat9 websockets examples, wicket > examples) on PC1 > 2) open application on PC2 > 3) turn off network interface of PC1 > Result: after some delay browser got Websocket Error: Network Error > Nothing happens on server (PC1) > > I can contact Tomcat community > The scenario looks to be very basic, so I'll do some more tests > > > Wicket just provides an abstraction over JSR356 WebSocket APIs. Wicket > > doesn't deal with network calls and/or http/websocket sessions. If the > > container notifies Wicket then Wicket cleans up internallly and notifies > > the application. > > > > > > > > > > It also seems invalid IWebSocketConnection is staying in the registry > > > > > > Is this known issue/behavior? > > > Shall Wicket code be updated to drop such invalid connections and call > > > onClose() or onError() ? > > > > > > -- > > > WBR > > > Maxim aka solomax > > > > > > > -- > WBR > Maxim aka solomax -- WBR Maxim aka solomax
