mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-06 16:36:51 +00:00
fix(server): correcter error equality check
This commit is contained in:
@@ -2,6 +2,7 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
@@ -54,7 +55,7 @@ func Start(cfg *config.Config, r chi.Router) error {
|
||||
|
||||
go func() {
|
||||
<-shutdownCtx.Done()
|
||||
if shutdownCtx.Err() == context.DeadlineExceeded {
|
||||
if errors.Is(shutdownCtx.Err(), context.DeadlineExceeded) {
|
||||
log.Fatalf("server: graceful shutdown timed out after %s; forcing exit.", shutdownTimeout)
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user