This commit is contained in:
suyl
2021-08-02 15:18:42 +08:00
parent fbc3c7ec8c
commit b524dcc890
2 changed files with 2 additions and 1 deletions

View File

@@ -227,7 +227,7 @@ func (t *TcpClient) isExist(key string) bool {
func (t *TcpClient) setPrintStatus(key string, status int) {
t.Lock()
defer t.Unlock()
if t.isExist(key) {
if t.Clients[key] != nil {
t.Clients[key].Status = status
t.Clients[key].StatusTime = time.Now()
}