Skip to content

Make StartConfig listener creation context-aware#2936

Open
EricGusmao wants to merge 1 commit intolabstack:masterfrom
EricGusmao:use-listenconfig-for-startconfig
Open

Make StartConfig listener creation context-aware#2936
EricGusmao wants to merge 1 commit intolabstack:masterfrom
EricGusmao:use-listenconfig-for-startconfig

Conversation

@EricGusmao
Copy link
Copy Markdown

Summary

  • Create listeners with net.ListenConfig so StartConfig respects the provided context during listener setup
  • Keep the existing serving behavior by defaulting ListenerNetwork to tcp and wrapping TLS listeners with
    tls.NewListener
  • simplify the listener creation path by using the same flow for TLS and non-TLS listeners

Benefit

StartConfig.Start and StartConfig.StartTLS already accept a context, but listener creation previously used net.Listen
and tls.Listen, which do not use that context. This change makes listener setup context-aware without changing how the
server behaves after the listener is created.

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