lib/onstomp/connections.rb in onstomp-1.0.7 vs lib/onstomp/connections.rb in onstomp-1.0.8

- old
+ new

@@ -92,11 +92,12 @@ ssl_opts = client.ssl.is_a?(Hash) ? client.ssl : {} ssl_opts = DEFAULT_SSL_OPTIONS.merge(ssl_opts) context = OpenSSL::SSL::SSLContext.new post_check = ssl_opts.delete(:post_connection_check) post_check_host = (post_check == true) ? host : post_check - DEFAULT_SSL_OPTIONS.keys.each do |k| - context.__send__(:"#{k}=", ssl_opts[k]) if ssl_opts.key?(k) + ssl_opts.each do |opt,val| + o_meth = :"#{opt}=" + context.__send__(o_meth, val) if context.respond_to?(o_meth) end tcp_sock = create_socket_tcp(client) socket = OpenSSL::SSL::SSLSocket.new(tcp_sock, context) socket.sync_close = true socket.connect