From 8282a50700a096b681bb74de3f61d651bdacbc0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20B=C3=A9janin?= Date: Wed, 27 May 2020 22:06:05 -0400 Subject: [PATCH] update Java-WebSocket to 1.5.1 --- src/matlab-websocket/pom.xml | 2 +- .../jebej/matlabwebsocket/MatlabWebSocketServer.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/matlab-websocket/pom.xml b/src/matlab-websocket/pom.xml index 5c2b9ce..26223cc 100644 --- a/src/matlab-websocket/pom.xml +++ b/src/matlab-websocket/pom.xml @@ -49,7 +49,7 @@ org.java-websocket Java-WebSocket - 1.3.9 + 1.5.1 diff --git a/src/matlab-websocket/src/main/java/io/github/jebej/matlabwebsocket/MatlabWebSocketServer.java b/src/matlab-websocket/src/main/java/io/github/jebej/matlabwebsocket/MatlabWebSocketServer.java index 88e610a..8104ddb 100644 --- a/src/matlab-websocket/src/main/java/io/github/jebej/matlabwebsocket/MatlabWebSocketServer.java +++ b/src/matlab-websocket/src/main/java/io/github/jebej/matlabwebsocket/MatlabWebSocketServer.java @@ -74,7 +74,7 @@ public void onClose( WebSocket conn, int code, String reason, boolean remote ) { // Retrieve a connection by hashcode public WebSocket getConnection( int hashCode ) { - Collection conns = connections(); + Collection conns = getConnections(); synchronized ( conns ) { for( WebSocket c : conns ) { if (c.hashCode() == hashCode) { @@ -102,7 +102,7 @@ public void sendTo( int hashCode, byte[] bytes ) { // Send text message to all clients public void sendToAll( String message ) { - Collection conns = connections(); + Collection conns = getConnections(); synchronized ( conns ) { for( WebSocket c : conns ) { c.send( message ); @@ -112,7 +112,7 @@ public void sendToAll( String message ) { // Send binary message to all clients public void sendToAll( ByteBuffer blob ) { - Collection conns = connections(); + Collection conns = getConnections(); synchronized ( conns ) { for( WebSocket c : conns ) { c.send( blob ); @@ -132,7 +132,7 @@ public void close( int hashCode ) { // Close all connections public void closeAll() { - Collection conns = connections(); + Collection conns = getConnections(); synchronized ( conns ) { for( WebSocket c : conns ) { c.close();