Commit 2e3e35ae authored by Alex Wenckus's avatar Alex Wenckus Committed by alex

Reverting changes as they aren't quite working right.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6754 b35dd754-fafc-0310-a699-88a17e54d16e
parent c2ce6be2
...@@ -540,13 +540,13 @@ public class SessionManager extends BasicModule { ...@@ -540,13 +540,13 @@ public class SessionManager extends BasicModule {
return session; return session;
} }
public HttpSession createClientHttpSession(long rid, InetAddress address, StreamID id, int hold) public HttpSession createClientHttpSession(long rid, InetAddress address, StreamID id)
throws UnauthorizedException throws UnauthorizedException
{ {
if (serverName == null) { if (serverName == null) {
throw new UnauthorizedException("Server not initialized"); throw new UnauthorizedException("Server not initialized");
} }
HttpSession session = new HttpSession(serverName, address, id, rid, hold); HttpSession session = new HttpSession(serverName, address, id, rid);
Connection conn = session.getConnection(); Connection conn = session.getConnection();
conn.init(session); conn.init(session);
conn.registerCloseListener(clientSessionListener, session); conn.registerCloseListener(clientSessionListener, session);
......
...@@ -118,7 +118,6 @@ public class HttpConnection { ...@@ -118,7 +118,6 @@ public class HttpConnection {
} }
catch (HttpBindTimeoutException e) { catch (HttpBindTimeoutException e) {
this.isClosed = true; this.isClosed = true;
session.closeConnection(this);
throw e; throw e;
} }
} }
......
...@@ -114,8 +114,9 @@ public class HttpSessionManager { ...@@ -114,8 +114,9 @@ public class HttpSessionManager {
int wait = getIntAttribute(rootNode.attributeValue("wait"), 60); int wait = getIntAttribute(rootNode.attributeValue("wait"), 60);
int hold = getIntAttribute(rootNode.attributeValue("hold"), 1); int hold = getIntAttribute(rootNode.attributeValue("hold"), 1);
HttpSession session = createSession(connection.getRequestId(), address, hold); HttpSession session = createSession(connection.getRequestId(), address);
session.setWait(Math.min(wait, getMaxWait())); session.setWait(Math.min(wait, getMaxWait()));
session.setHold(hold);
session.setSecure(connection.isSecure()); session.setSecure(connection.isSecure());
session.setMaxPollingInterval(getPollingInterval()); session.setMaxPollingInterval(getPollingInterval());
session.setMaxRequests(getMaxRequests()); session.setMaxRequests(getMaxRequests());
...@@ -233,13 +234,11 @@ public class HttpSessionManager { ...@@ -233,13 +234,11 @@ public class HttpSessionManager {
return connection; return connection;
} }
private HttpSession createSession(long rid, InetAddress address, int hold) private HttpSession createSession(long rid, InetAddress address) throws UnauthorizedException {
throws UnauthorizedException
{
// Create a ClientSession for this user. // Create a ClientSession for this user.
StreamID streamID = SessionManager.getInstance().nextStreamID(); StreamID streamID = SessionManager.getInstance().nextStreamID();
// Send to the server that a new client session has been created // Send to the server that a new client session has been created
HttpSession session = sessionManager.createClientHttpSession(rid, address, streamID, hold); HttpSession session = sessionManager.createClientHttpSession(rid, address, streamID);
// Register that the new session is associated with the specified stream ID // Register that the new session is associated with the specified stream ID
sessionMap.put(streamID.getID(), session); sessionMap.put(streamID.getID(), session);
session.addSessionCloseListener(sessionListener); session.addSessionCloseListener(sessionListener);
......
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