We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 857bc87 + c20e499 commit b14a7baCopy full SHA for b14a7ba
lib/websocket-client-simple/client.rb
@@ -23,10 +23,11 @@ def connect(url, options={})
23
ctx = OpenSSL::SSL::SSLContext.new
24
ctx.ssl_version = options[:ssl_version] if options[:ssl_version]
25
ctx.verify_mode = options[:verify_mode] if options[:verify_mode]
26
- cert_store = OpenSSL::X509::Store.new
+ cert_store = options[:cert_store] || OpenSSL::X509::Store.new
27
cert_store.set_default_paths
28
ctx.cert_store = cert_store
29
@socket = ::OpenSSL::SSL::SSLSocket.new(@socket, ctx)
30
+ @socket.sync_close = true
31
@socket.hostname = uri.host
32
@socket.connect
33
end
0 commit comments