Skip to content

Commit

Permalink
v2.6.4 fix socket null exception
Browse files Browse the repository at this point in the history
  • Loading branch information
psygames committed Mar 8, 2022
1 parent c268871 commit 56d28a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public WebSocketState ReadyState
public event EventHandler<MessageEventArgs> OnMessage;

private ClientWebSocket socket;
private bool isOpening => socket.State == System.Net.WebSockets.WebSocketState.Open;
private bool isOpening => socket != null && socket.State == System.Net.WebSockets.WebSocketState.Open;

#region APIs
public WebSocket(string address)
Expand Down

0 comments on commit 56d28a3

Please sign in to comment.