fix: resolve network connection count always showing 0 in process list (#10979)

This commit is contained in:
CityFun 2025-11-18 14:04:23 +08:00 committed by GitHub
parent fd270263f4
commit f1677f5a67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -206,6 +206,10 @@ func getProcessData(processConfig PsProcessConfig) (res []byte, err error) {
procData.RssValue = 0
}
if connections, err := proc.Connections(); err == nil {
procData.NumConnections = len(connections)
}
resultMutex.Lock()
result = append(result, procData)
resultMutex.Unlock()

View file

@ -168,6 +168,7 @@ const columns = ref([
title: i18n.global.t('process.numConnections'),
dataKey: 'numConnections',
width: 100,
sortable: true,
},
{
key: 'status',