Commit 59a6b4c0 authored by Alex Wenckus's avatar Alex Wenckus Committed by alex

Fixed problems with restarting HTTPSessionManager.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6052 b35dd754-fafc-0310-a699-88a17e54d16e
parent 500a4ae0
......@@ -62,8 +62,8 @@ public class HttpSessionManager {
private SessionManager sessionManager;
private Map<String, HttpSession> sessionMap = new ConcurrentHashMap<String, HttpSession>();
private Timer inactivityTimer = new Timer("HttpSession Inactivity Timer");
private TimerTask inactivityThread = new HttpSessionReaper();
private Timer inactivityTimer;
private TimerTask inactivityThread;
static {
// Set the default read idle timeout. If none was set then assume 30 minutes
......@@ -77,12 +77,16 @@ public class HttpSessionManager {
}
public void start() {
inactivityThread = new HttpSessionReaper();
inactivityTimer = new Timer("HttpSession Inactivity Timer");
inactivityTimer.schedule(inactivityThread, 30 * JiveConstants.SECOND,
30 * JiveConstants.SECOND);
}
public void stop() {
inactivityTimer.cancel();
inactivityTimer = null;
inactivityThread = null;
for(HttpSession session : sessionMap.values()) {
session.close();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment