Skip to content

Commit

Permalink
Add remistakenly removed code
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed May 18, 2012
1 parent b1f5664 commit 919ebcb
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -591,6 +591,17 @@ public HttpSession getSession() {
return session;
}

/**
* {@inheritDoc}
*/
@Override
public HttpSession getSession(boolean create) {
if (create) {
return getSession();
}
return session == null && isNotNoOps() ? b.request.getSession(false) : session;
}

private HttpSession createSession() {
return !isNotNoOps() ?
new FakeHttpSession("", null, System.currentTimeMillis(), -1) :
Expand Down Expand Up @@ -1470,7 +1481,7 @@ public final static AtmosphereRequest cloneRequest(HttpServletRequest request, b
.serverName(request.getServerName())
.serverPort(request.getServerPort())
.destroyable(false)
.session(copySession? new FakeHttpSession(request.getSession(true)) : null);
.session(copySession ? new FakeHttpSession(request.getSession(true)) : null);

if (loadInMemory) {
r = new NoOpsRequest();
Expand Down

0 comments on commit 919ebcb

Please sign in to comment.