mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
http3: improve debug message when determining the listener port fails (#4214)
Fixes: #4212
This commit is contained in:
parent
5d6bf7e206
commit
d3c5f389d4
1 changed files with 3 additions and 2 deletions
|
@ -418,10 +418,11 @@ func (s *Server) addListener(l *QUICEarlyListener) error {
|
||||||
s.listeners = make(map[*QUICEarlyListener]listenerInfo)
|
s.listeners = make(map[*QUICEarlyListener]listenerInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
if port, err := extractPort((*l).Addr().String()); err == nil {
|
laddr := (*l).Addr()
|
||||||
|
if port, err := extractPort(laddr.String()); err == nil {
|
||||||
s.listeners[l] = listenerInfo{port}
|
s.listeners[l] = listenerInfo{port}
|
||||||
} else {
|
} else {
|
||||||
s.logger.Errorf("Unable to extract port from listener %+v, will not be announced using SetQuicHeaders: %s", err)
|
s.logger.Errorf("Unable to extract port from listener %s, will not be announced using SetQuicHeaders: %s", laddr, err)
|
||||||
s.listeners[l] = listenerInfo{}
|
s.listeners[l] = listenerInfo{}
|
||||||
}
|
}
|
||||||
s.generateAltSvcHeader()
|
s.generateAltSvcHeader()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue