mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Don't tightloop when a listener can no longer accept connections
This commit is contained in:
parent
74ca02edfd
commit
bcd80b043f
1 changed files with 1 additions and 1 deletions
|
@ -374,7 +374,7 @@ func (l *links) listen(u *url.URL, sintf string) (*Listener, error) {
|
||||||
for {
|
for {
|
||||||
conn, err := listener.Accept()
|
conn, err := listener.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
return
|
||||||
}
|
}
|
||||||
go func(conn net.Conn) {
|
go func(conn net.Conn) {
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue