fix: overhaul docker container termination signals (#192)

Fixes https://github.com/pterodactyl/panel/issues/4783

Requires https://github.com/pterodactyl/panel/pull/5132 to work
This commit is contained in:
Daniel Barton
2024-06-30 02:31:36 +08:00
committed by GitHub
parent 5a15612754
commit 29e4425e21
3 changed files with 54 additions and 34 deletions

View File

@@ -3,7 +3,6 @@ package server
import (
"context"
"fmt"
"os"
"time"
"emperror.dev/errors"
@@ -161,7 +160,7 @@ func (s *Server) HandlePowerAction(action PowerAction, waitSeconds ...int) error
return s.Environment.Start(s.Context())
case PowerActionTerminate:
return s.Environment.Terminate(s.Context(), os.Kill)
return s.Environment.Terminate(s.Context(), "SIGKILL")
}
return errors.New("attempting to handle unknown power action")