Skip to content

Commit

Permalink
server: fix show problem for kill tidb connection (pingcap#24031) (pi…
Browse files Browse the repository at this point in the history
  • Loading branch information
yiwen92 authored Nov 12, 2021
1 parent a4bd02e commit 52c6890
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ func (s *Server) ShowProcessList() map[uint64]*util.ProcessInfo {
defer s.rwlock.RUnlock()
rs := make(map[uint64]*util.ProcessInfo, len(s.clients))
for _, client := range s.clients {
if atomic.LoadInt32(&client.status) == connStatusWaitShutdown {
continue
}
if pi := client.ctx.ShowProcess(); pi != nil {
rs[pi.ID] = pi
}
Expand Down

0 comments on commit 52c6890

Please sign in to comment.