Skip to content

Commit

Permalink
fix: use os.Kill only
Browse files Browse the repository at this point in the history
  • Loading branch information
bhoopesh369 committed Jan 21, 2024
1 parent eb28a5e commit ad283de
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions utils/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,9 @@ func InitWebsocket(c echo.Context) error {
}

func dropConnection(ws *models.WebsocketConnection, c echo.Context) {
err := ws.LSPServer.Process.Process.Signal(os.Interrupt)
err := ws.LSPServer.Process.Process.Signal(os.Kill)
if err != nil {
c.Echo().Logger.Error(err)
err = ws.LSPServer.Process.Process.Signal(os.Kill)
if err != nil {
c.Echo().Logger.Error(err)
}
}
_ = ws.LSPServer.DevNullFd.Close()
// Reads process exit state to remove the <defunct> process from the system process table
Expand Down

0 comments on commit ad283de

Please sign in to comment.