Skip to content

Commit c20e499

Browse files
authored
Update lib/websocket-client-simple/client.rb
1 parent 086e279 commit c20e499

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/websocket-client-simple/client.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ def connect(url, options={})
2323
ctx = OpenSSL::SSL::SSLContext.new
2424
ctx.ssl_version = options[:ssl_version] if options[:ssl_version]
2525
ctx.verify_mode = options[:verify_mode] if options[:verify_mode]
26-
cert_store = options[:cert_store]
27-
unless cert_store
28-
cert_store = OpenSSL::X509::Store.new
29-
end
26+
cert_store = options[:cert_store] || OpenSSL::X509::Store.new
3027
cert_store.set_default_paths
3128
ctx.cert_store = cert_store
3229
@socket = ::OpenSSL::SSL::SSLSocket.new(@socket, ctx)

0 commit comments

Comments
 (0)