🧹 Handle TCP6 addr in Prefork

pull/633/head
Fenny 2020-07-18 01:03:14 +02:00
parent 468404efe4
commit 2893c13718
1 changed files with 4 additions and 0 deletions

4
app.go
View File

@ -490,6 +490,10 @@ func (app *App) Listen(address interface{}, tlsconfig ...*tls.Config) error {
app.init()
// Start prefork
if app.Settings.Prefork {
// Prefork only supports tcp4 or tcp6, but not both
if isIPv6(addr) {
app.Settings.Network = "tcp6"
}
return app.prefork(addr, tlsconfig...)
}
// Setup listener