diff --git a/NativeWebSocket/Assets/WebSocket/WebSocket.cs b/NativeWebSocket/Assets/WebSocket/WebSocket.cs index 503cf43..956fa21 100644 --- a/NativeWebSocket/Assets/WebSocket/WebSocket.cs +++ b/NativeWebSocket/Assets/WebSocket/WebSocket.cs @@ -571,12 +571,12 @@ private async Task SendMessage(List> queue, WebSocketMessageT finally { Monitor.Exit(m_Socket); - } - // Note that we've finished sending. - lock (OutgoingMessageLock) - { - isSending = false; + // Note that we've finished sending. + lock (OutgoingMessageLock) + { + isSending = false; + } } // Handle any queued messages. diff --git a/NativeWebSocket/Assets/WebSocket/WebSocket.jslib b/NativeWebSocket/Assets/WebSocket/WebSocket.jslib index 052f213..9d8e42f 100644 --- a/NativeWebSocket/Assets/WebSocket/WebSocket.jslib +++ b/NativeWebSocket/Assets/WebSocket/WebSocket.jslib @@ -17,7 +17,7 @@ var LibraryWebSocket = { /* Event listeners */ onOpen: null, - onMesssage: null, + onMessage: null, onError: null, onClose: null, diff --git a/NativeWebSocket/Assets/package.json b/NativeWebSocket/Assets/package.json index 8846f6a..e22fe68 100644 --- a/NativeWebSocket/Assets/package.json +++ b/NativeWebSocket/Assets/package.json @@ -1,6 +1,6 @@ { "name": "com.endel.nativewebsocket", - "version": "1.1.4", + "version": "1.1.5", "description": "WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP).", "license": "Apache 2.0", "repository": { diff --git a/README.md b/README.md index 89ffb6c..f04440d 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ public class Connection : MonoBehaviour // Start is called before the first frame update async void Start() { - websocket = new WebSocket("ws://localhost:2567"); + websocket = new WebSocket("ws://localhost:3000"); websocket.OnOpen += () => {