core: Reuse unix sockets (UDS) and don't try to serve HTTP/3 over UDS (#5063)

* core: Reuse unix sockets

* Don't serve HTTP/3 over unix sockets

This requires upstream support, if even useful

* Don't use unix build tag... yet

* Fix build tag

* Allow ErrNotExist when unlinking socket
This commit is contained in:
Matt Holt
2022-09-21 12:55:23 -06:00
committed by GitHub
parent 44ad0cedaf
commit 1426c97da5
4 changed files with 134 additions and 36 deletions

View File

@ -409,7 +409,7 @@ func (app *App) Start() error {
ln = tls.NewListener(ln, tlsCfg)
// enable HTTP/3 if configured
if srv.protocol("h3") {
if srv.protocol("h3") && !listenAddr.IsUnixNetwork() {
app.logger.Info("enabling HTTP/3 listener", zap.String("addr", hostport))
if err := srv.serveHTTP3(hostport, tlsCfg); err != nil {
return err