private Multimap<String, Socket> onlineUsers = ArrayListMultimap.create(); UsersMessage = onlineUsers.get(username); SocketThread.sendLogOff(ListSocket.UsersMessage, username, computername); for (Socket m : UsersMessage) { kss++; onlineUsers.remove(username, m); } If there is onlineUsers.remove (username, m), then for some reason the cycle is executed once, and if not, then the number of times it is in the UsersMessage What is it?