Skip to content

Conversation

@aviddiviner
Copy link

Just some small fixups:

  • ListenAndServeTLS allocated addr but never used it.
  • ListenAndServe didn't default to listen on :http like it should.

@aviddiviner
Copy link
Author

I also added TCP keep-alives on connections from ListenAndServe. As you can see from the docs on net/http:

ListenAndServe listens on the TCP network address srv.Addr and then calls Serve to handle requests on incoming connections. Accepted connections are configured to enable TCP keep-alives.

Keep-alives were already being done on ListenAndServeTLS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant