Skip to content

Commit d1cf17d

Browse files
committed
Handle http.ErrServerClosed from http.Listen
Signed-off-by: Oleksandr Redko <[email protected]>
1 parent 9b24908 commit d1cf17d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/limactl/hostagent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func hostagentAction(cmd *cobra.Command, args []string) error {
105105
go func() {
106106
defer os.RemoveAll(socket)
107107
defer srv.Close()
108-
if serveErr := srv.Serve(l); serveErr != nil {
108+
if serveErr := srv.Serve(l); serveErr != http.ErrServerClosed {
109109
logrus.WithError(serveErr).Warn("hostagent API server exited with an error")
110110
}
111111
}()

0 commit comments

Comments
 (0)