Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for the null session problem

  • Loading branch information...
commit af4018db7839d93378e28130f6c43daa704545dd 1 parent 287947a
@murz authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/play/modules/fbconnect/FBConnectPlugin.java
View
12 src/play/modules/fbconnect/FBConnectPlugin.java
@@ -12,14 +12,18 @@
private static ThreadLocal<FBConnectSession> _session = new ThreadLocal<FBConnectSession>();
public FBConnectSession session(){
- return _session.get();
+ FBConnectSession session = _session.get();
+ if(session == null){
+ session = new FBConnectSession();
+ session.init();
+ _session.set(session);
+ }
+ return session;
}
@Override
public void onApplicationStart() {
- FBConnectSession session = new FBConnectSession();
- session.init();
- _session.set(session);
+ session();
}
@Override
Please sign in to comment.
Something went wrong with that request. Please try again.