|
@@ -62,7 +62,7 @@ public class WebSocketServerEndpoint {
|
|
|
|
|
|
@OnOpen
|
|
|
public void onOpen(Session session, @PathParam("path") String path) {
|
|
|
- long amount = counter.getAndIncrement();
|
|
|
+ long amount = counter.incrementAndGet();
|
|
|
|
|
|
this.sessionId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
|
@@ -140,7 +140,7 @@ public class WebSocketServerEndpoint {
|
|
|
@OnClose
|
|
|
public void onClose(Session session, @PathParam("path") String path) {
|
|
|
|
|
|
- long amount = counter.getAndDecrement();
|
|
|
+ long amount = counter.decrementAndGet();
|
|
|
|
|
|
SessionInfo sessionInfo = WebSocketHelper.getSessionInfo(session);
|
|
|
if (null != sessionInfo) {
|