From 63c3d134c9a6b3cbc956e9839e162f907f43f002 Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 17 Nov 2016 16:57:16 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/WebSocket.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index cf0caa4c..a8363493 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -2670,14 +2670,14 @@ namespace WebSocketSharp /// public void Send (byte[] data) { - if (data == null) - throw new ArgumentNullException ("data"); - if (_readyState != WebSocketState.Open) { var msg = "The current state of the connection is not Open."; throw new InvalidOperationException (msg); } + if (data == null) + throw new ArgumentNullException ("data"); + send (Opcode.Binary, new MemoryStream (data)); }