Skip to content

Commit

Permalink
fixup! Replace HTTP::Server#tls with HTTP::Server#bind_ssl
Browse files Browse the repository at this point in the history
Remove default argument for context in HTTP::Server#bind_ssl
  • Loading branch information
straight-shoota committed Aug 4, 2018
1 parent 8b06657 commit b0c7d3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http/server.cr
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class HTTP::Server
# context.private_key = "openssl.key"
# server.bind_ssl "127.0.0.1", 8080, context
# ```
def bind_ssl(host : String, port : Int32, context : OpenSSL::SSL::Context::Server = OpenSSL::SSL::Context::Server.new, reuse_port : Bool = false) : Socket::IPAddress
def bind_ssl(host : String, port : Int32, context : OpenSSL::SSL::Context::Server, reuse_port : Bool = false) : Socket::IPAddress
tcp_server = TCPServer.new(host, port, reuse_port)
server = OpenSSL::SSL::Server.new(tcp_server, context)

Expand All @@ -214,7 +214,7 @@ class HTTP::Server
# context.private_key = "openssl.key"
# address = server.bind_ssl "127.0.0.1", context
# ```
def bind_ssl(host : String, context : OpenSSL::SSL::Context::Server = OpenSSL::SSL::Context::Server.new) : Socket::IPAddress
def bind_ssl(host : String, context : OpenSSL::SSL::Context::Server) : Socket::IPAddress
bind_ssl(host, 0, context)
end
{% end %}
Expand Down

0 comments on commit b0c7d3d

Please sign in to comment.