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

when connecting new listener, bind:already in use error occurs #542

Open
lhd2001 opened this issue Apr 28, 2023 · 1 comment
Open

when connecting new listener, bind:already in use error occurs #542

lhd2001 opened this issue Apr 28, 2023 · 1 comment

Comments

@lhd2001
Copy link

lhd2001 commented Apr 28, 2023

Your environment.

  • Version: v.2.0.10, v.2.2.6 Release or SHA

  • Browser: golang:1.14-alpine3.12, golang:1.20.3-alpine3.17 include version

  • Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context
    listener.go line 70 : return Server(c, l.config)
    ------------------------------------------------>
    s, err := Server(c, l.config)
    if s == nil {
    c.Close()
    }

    return s, err
    }

What did you do?

After Accept, server (c, l.config) returns nil.
Later, listener close -> when connecting new listener

What did you expect?

new listener bind

What happened?

bind:already in use error occurs.
Because udp.Listen is stopped at l.connWG.wait

@hasheddan
Copy link
Contributor

Hi @lhd2001! Are you trying to re-use the underlying UDP listener with a new DTLS listener?

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