Skip to content

Commit 461aeef

Browse files
authored
Merge pull request #20 from cyberarm/patch-1
Make #open? safe to use when @handshake is nil
2 parents d5f968f + dad58f4 commit 461aeef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/websocket-client-simple/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def close
9797
end
9898

9999
def open?
100-
@handshake.finished? and !@closed
100+
@handshake&.finished? and !@closed
101101
end
102102

103103
def closed?

0 commit comments

Comments
 (0)