Fix an uninitialised variable warning.

This commit is contained in:
James Coglan
2019-05-24 14:59:01 +01:00
parent 5b957c6660
commit 8a6f9ef737
+2
View File
@@ -74,6 +74,8 @@ module WebSocket
if protos = @socket.env['HTTP_SEC_WEBSOCKET_PROTOCOL']
protos = protos.split(/ *, */) if String === protos
@protocol = protos.find { |p| @protocols.include?(p) }
else
@protocol = nil
end
end