Make Extensions#close safe to call if @sessions is not yet initialised, in case the socket is closed before handshaking.
This commit is contained in:
@@ -155,6 +155,8 @@ module WebSocket
|
||||
end
|
||||
|
||||
def close
|
||||
return unless @sessions
|
||||
|
||||
@sessions.each do |ext, session|
|
||||
session.close rescue nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user