forked from External/mage
added connection leasing + cleanup
This commit is contained in:
parent
b1408507cb
commit
ade836c08a
12 changed files with 115 additions and 84 deletions
|
|
@ -82,8 +82,12 @@ public class SessionManager {
|
|||
return false;
|
||||
}
|
||||
|
||||
public void removeSession(String sessionId) {
|
||||
sessions.remove(sessionId);
|
||||
public synchronized void disconnect(String sessionId) {
|
||||
Session session = sessions.get(sessionId);
|
||||
if (session != null) {
|
||||
session.kill();
|
||||
sessions.remove(sessionId);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Session> getSessions() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue