Skip to content

Commit

Permalink
[PinpiontWeb] fix a ActiveThread concurrency problem pinpoint-apm#1244
Browse files Browse the repository at this point in the history
hot fix : active thread concurrency issue
  • Loading branch information
koo-taejin committed Nov 23, 2015
1 parent 197ac8b commit daaa866
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.springframework.web.socket.handler.TextWebSocketHandler;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
Expand All @@ -59,7 +60,7 @@ public class ActiveThreadCountHandler extends TextWebSocketHandler implements Pi
private final Object lock = new Object();
private final AgentService agentSerivce;
private final List<WebSocketSession> sessionRepository = new CopyOnWriteArrayList<>();
private final Map<String, PinpointWebSocketResponseAggregator> aggregatorRepository = new HashMap<>();
private final Map<String, PinpointWebSocketResponseAggregator> aggregatorRepository = new ConcurrentHashMap<>();
private PinpointWebSocketMessageConverter messageConverter = new PinpointWebSocketMessageConverter();

private static final String DEFAULT_REQUEST_MAPPING = "/agent/activeThread";
Expand Down

0 comments on commit daaa866

Please # to comment.