wsservice: remove sessions on close or error
This commit is contained in:
@@ -75,12 +75,14 @@ public class WSService
|
|||||||
@OnClose
|
@OnClose
|
||||||
public void onClose(Session session, CloseReason resaon)
|
public void onClose(Session session, CloseReason resaon)
|
||||||
{
|
{
|
||||||
|
SessionManager.remove(session);
|
||||||
logger.info("Close session {}", session);
|
logger.info("Close session {}", session);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnError
|
@OnError
|
||||||
public void onError(Session session, Throwable ex)
|
public void onError(Session session, Throwable ex)
|
||||||
{
|
{
|
||||||
|
SessionManager.remove(session);
|
||||||
logger.warn("Error in session {}", session, ex);
|
logger.warn("Error in session {}", session, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user