Skip to content

Commit

Permalink
Fixing failure on wrapped errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmidi committed Nov 26, 2024
1 parent 4a8275b commit cb2b46b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"context"
"encoding/json"
"errors"
"log"
"net/http"
"sync"
Expand Down Expand Up @@ -43,7 +44,7 @@ func (s *Server) Listen(ctx context.Context) error {
go func() {
defer s.done.Done()
err := serv.ListenAndServe()
if err != nil && err != http.ErrServerClosed {
if err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Println(err)
}
}()
Expand Down

0 comments on commit cb2b46b

Please sign in to comment.