mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 07:24:10 +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…
x
Reference in New Issue
Block a user