1
0
mirror of https://github.com/kataras/iris.git synced 2026-03-08 01:16:30 +00:00

improve the new Wait method

This commit is contained in:
Gerasimos (Makis) Maropoulos
2024-01-15 04:20:45 +02:00
parent 70882914d4
commit 12546322eb
3 changed files with 29 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ func main() {
ctx.Writef("Hello, %s!", "World")
})
app.Listen(":8080", iris.NonBlocking())
app.Listen(":8080", iris.NonBlocking(), iris.WithoutServerError(iris.ErrServerClosed))
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
defer cancel()