Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] micro.AddListenOption not working #2645

Open
ostoe opened this issue Jul 7, 2023 · 2 comments
Open

[BUG] micro.AddListenOption not working #2645

ostoe opened this issue Jul 7, 2023 · 2 comments

Comments

@ostoe
Copy link

ostoe commented Jul 7, 2023

Describe the bug

  1. What are you trying to do?
    use my custom listener.
  2. What did you expect to happen?
    add my listener via micro.AddListenOption
		micro.AddListenOption(func(o *server.Options) {
			o.ListenOptions = append(o.ListenOptions,
				func(lo *transport.ListenOptions) { lo.Context = ctx },
			)
		}),
  1. What happens instead?
    Nothing!

It will be never get the Listener from Context

bug uri:
if l, ok := o.Context.Value(netListener{}).(net.Listener); ok && l != nil {

@ostoe
Copy link
Author

ostoe commented Jul 7, 2023

ad

@jochumdev
Copy link
Member

jochumdev commented Aug 5, 2023

Still working on that? Any chance to give more context?

@jochumdev jochumdev changed the title [BUG] [BUG] micro.AddListenOption not working Nov 27, 2023
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

No branches or pull requests

2 participants