|
@@ -343,10 +343,11 @@ func (sshServer *sshServer) stopClients() {
|
|
|
|
|
|
|
|
sshServer.clientsMutex.Lock()
|
|
sshServer.clientsMutex.Lock()
|
|
|
sshServer.stoppingClients = true
|
|
sshServer.stoppingClients = true
|
|
|
|
|
+ clients := sshServer.clients
|
|
|
sshServer.clients = make(map[sshClientID]*sshClient)
|
|
sshServer.clients = make(map[sshClientID]*sshClient)
|
|
|
sshServer.clientsMutex.Unlock()
|
|
sshServer.clientsMutex.Unlock()
|
|
|
|
|
|
|
|
- for _, client := range sshServer.clients {
|
|
|
|
|
|
|
+ for _, client := range clients {
|
|
|
client.stop()
|
|
client.stop()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|