mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-27 10:44:02 +08:00
fix(connections): limit number of conns
This commit is contained in:
parent
700302fd78
commit
5263710d30
@ -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))
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user