Skip to content

Make StartConfig listener creation context-aware#2936

Merged
aldas merged 1 commit intolabstack:masterfrom
EricGusmao:use-listenconfig-for-startconfig
Apr 4, 2026
Merged

Make StartConfig listener creation context-aware#2936
aldas merged 1 commit intolabstack:masterfrom
EricGusmao:use-listenconfig-for-startconfig

Conversation

@EricGusmao
Copy link
Copy Markdown
Contributor

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.07%. Comparing base (22e4b71) to head (2da598d).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2936      +/-   ##
==========================================
- Coverage   93.07%   93.07%   -0.01%     
==========================================
  Files          43       43              
  Lines        4506     4503       -3     
==========================================
- Hits         4194     4191       -3     
  Misses        195      195              
  Partials      117      117              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@aldas aldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aldas aldas merged commit 607f385 into labstack:master Apr 4, 2026
10 checks passed
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.

2 participants