fix(connections): limit number of conns

This commit is contained in:
Zephyruso 2023-09-08 13:43:47 +08:00
parent 700302fd78
commit 5263710d30

View File

@ -53,11 +53,11 @@ export const useConnections = () => {
if (!paused()) {
const closedConns = diffClosedConnections(activeConns, allConns)
setActiveConnections(activeConns)
setClosedConnections(closedConns)
setActiveConnections(activeConns.slice(-200))
setClosedConnections(closedConns.slice(-200))
}
setAllConnections(allConns)
setAllConnections(allConns.slice(-400))
})
})