Fixed possible NPE between callbacks (as client and server are not synchronized between calls)

This commit is contained in:
magenoxx 2011-06-22 20:35:16 +04:00
parent 2977afea2d
commit c7ae032d5a
2 changed files with 8 additions and 2 deletions

View file

@ -101,7 +101,11 @@ public class ServerImpl extends RemoteServer implements Server {
@Override
public ClientCallback callback(UUID sessionId) {
return SessionManager.getInstance().getSession(sessionId).callback();
Session session = SessionManager.getInstance().getSession(sessionId);
if (session == null) {
return null;
}
return session.callback();
}
@Override