bugfix: Fixes shutdown functionality (#131)
Fixes an issue where the shutdown functionality did not check for the error type
This commit is contained in:
committed by
GitHub
parent
93fe3e8bd6
commit
c204ebc514
@@ -33,8 +33,12 @@ func startServer(client *Client, projectInfo *ProjectInfo) {
|
|||||||
go func() {
|
go func() {
|
||||||
err := server.Serve(l)
|
err := server.Serve(l)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Error starting server: %s\n", err)
|
if errors.Is(err, http.ErrServerClosed) {
|
||||||
os.Exit(1)
|
os.Exit(0)
|
||||||
|
} else {
|
||||||
|
fmt.Fprintf(os.Stderr, "Server did not respond: %s\n", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user