diff --git a/cmd/httpServer.go b/cmd/httpServer.go index a7b6bb8..20fc7a9 100644 --- a/cmd/httpServer.go +++ b/cmd/httpServer.go @@ -80,9 +80,13 @@ func removeClient(c *gin.Context) { if err != nil { return } - client.Instruct(Instructions{ - IsKillswitch: true, - }) + + if client.IsOnline == true { + client.Instruct(Instructions{ + IsKillswitch: true, + }) + } + log.Printf("Removing client %v\n", intClientID) if len(clientList) != 1 { clientList = append(clientList[:intClientID], clientList[intClientID+1:]...)