openvidu-java-client: null pointer fix

pull/375/head
pabloFuente 2019-06-03 15:49:38 +02:00
parent aa0d96ca30
commit 1829ee15fe
2 changed files with 3 additions and 3 deletions

View File

@ -564,7 +564,7 @@ public class OpenVidu {
this.activeSessions.computeIfAbsent(sessionId, sId -> {
log.info("New session '{}' fetched", sessionId);
hasChanged[0] = true;
return new Session((JSONObject) session);
return new Session(this, (JSONObject) session);
});
});

View File

@ -27,7 +27,6 @@ import java.util.stream.Collectors;
import org.apache.http.HttpHeaders;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
@ -64,7 +63,8 @@ public class Session {
this.getSessionIdHttp();
}
protected Session(JSONObject json) {
protected Session(OpenVidu openVidu, JSONObject json) {
this.openVidu = openVidu;
this.resetSessionWithJson(json);
}