This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push: new 98b4147 [OPENMEETINGS-1649] stream clean-up is improved 98b4147 is described below commit 98b4147b997b6843d915307bda2a462cf2375552 Author: Maxim Solodovnik <solomax...@gmail.com> AuthorDate: Sat Oct 6 09:43:22 2018 +0700 [OPENMEETINGS-1649] stream clean-up is improved --- .../openmeetings/core/remote/KurentoHandler.java | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java index bba9453..4425f33 100644 --- a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java +++ b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java @@ -310,14 +310,16 @@ public class KurentoHandler { if (test) { testsByUid.remove(uid); } else { - Client c = (Client)_c; - KRoom room = rooms.get(c.getRoomId()); - if (room != null) { - room.leave(c); - } usersByUid.remove(uid); } } + if (!test) { + Client c = (Client)_c; + KRoom room = rooms.get(c.getRoomId()); + if (room != null) { + room.leave(c); + } + } } public KRoom getRoom(Long roomId) { @@ -326,9 +328,11 @@ public class KurentoHandler { if (room == null) { log.debug("Room {} does not exist. Will create now!", roomId); - MediaPipeline pipe = client.createMediaPipeline(); - pipe.addTag(TAG_KUID, kuid); - pipe.addTag(TAG_ROOM, String.valueOf(roomId)); + Transaction t = client.beginTransaction(); + MediaPipeline pipe = client.createMediaPipeline(t); + pipe.addTag(t, TAG_KUID, kuid); + pipe.addTag(t, TAG_ROOM, String.valueOf(roomId)); + t.commit(); room = new KRoom(roomId, pipe); rooms.put(roomId, room); } @@ -336,12 +340,6 @@ public class KurentoHandler { return room; } - public void removeRoom(KRoom room) { - this.rooms.remove(room.getRoomId()); - room.close(); - log.info("Room {} removed and closed", room.getRoomId()); - } - private KStream getByUid(String uid) { return uid == null ? null : usersByUid.get(uid); }