🐛 quickfix: nil point

This commit is contained in:
naiba
2021-01-18 13:45:06 +08:00
parent 769b61843e
commit c5379a0092
5 changed files with 5 additions and 6 deletions

View File

@@ -88,8 +88,7 @@ func (s *NezhaHandler) ReportSystemState(c context.Context, r *pb.State) (*pb.Re
state := model.PB2State(r)
dao.ServerLock.RLock()
defer dao.ServerLock.RUnlock()
now := time.Now()
dao.ServerList[clientID].LastActive = &now
dao.ServerList[clientID].LastActive = time.Now()
dao.ServerList[clientID].State = &state
return &pb.Receipt{Proced: true}, nil
}