Commit 95ca5850 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Modified syncrhonization blocks to use finer-grained locks.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@683 b35dd754-fafc-0310-a699-88a17e54d16e
parent c5699655
......@@ -268,7 +268,7 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
public MUCRoom getChatRoom(String roomName, JID userjid) throws UnauthorizedException {
MUCRoom room = null;
synchronized (rooms) {
synchronized (roomName.intern()) {
room = rooms.get(roomName.toLowerCase());
if (room == null) {
room = new MUCRoomImpl(this, roomName, router);
......@@ -347,7 +347,7 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
throw new IllegalStateException("Not initialized");
}
MUCUser user = null;
synchronized (users) {
synchronized (userjid.toString().intern()) {
user = users.get(userjid);
if (user == null) {
user = new MUCUserImpl(this, router, userjid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment