Skip to content

Commit e6051f3

Browse files
committed
fixing issue Gottox#15
1 parent 92cb351 commit e6051f3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/io/socket/IOConnection.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,11 @@ static public IOConnection register(String origin, SocketIO socket) {
226226
list = new LinkedList<IOConnection>();
227227
connections.put(origin, list);
228228
} else {
229-
for (IOConnection connection : list) {
230-
if (connection.register(socket))
231-
return connection;
229+
synchronized (list) {
230+
for (IOConnection connection : list) {
231+
if (connection.register(socket))
232+
return connection;
233+
}
232234
}
233235
}
234236

0 commit comments

Comments
 (0)