Check if client is online before sending killswitch
This commit is contained in:
parent
d07e6435fb
commit
6c77b7d674
|
@ -80,9 +80,13 @@ func removeClient(c *gin.Context) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
client.Instruct(Instructions{
|
|
||||||
IsKillswitch: true,
|
if client.IsOnline == true {
|
||||||
})
|
client.Instruct(Instructions{
|
||||||
|
IsKillswitch: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("Removing client %v\n", intClientID)
|
log.Printf("Removing client %v\n", intClientID)
|
||||||
if len(clientList) != 1 {
|
if len(clientList) != 1 {
|
||||||
clientList = append(clientList[:intClientID], clientList[intClientID+1:]...)
|
clientList = append(clientList[:intClientID], clientList[intClientID+1:]...)
|
||||||
|
|
Loading…
Reference in New Issue