mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-27 22:54:03 +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()) {
|
if (!paused()) {
|
||||||
const closedConns = diffClosedConnections(activeConns, allConns)
|
const closedConns = diffClosedConnections(activeConns, allConns)
|
||||||
|
|
||||||
setActiveConnections(activeConns)
|
setActiveConnections(activeConns.slice(-200))
|
||||||
setClosedConnections(closedConns)
|
setClosedConnections(closedConns.slice(-200))
|
||||||
}
|
}
|
||||||
|
|
||||||
setAllConnections(allConns)
|
setAllConnections(allConns.slice(-400))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user