allow setting maxPeers in handler

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-05-03 00:59:15 +02:00
parent b135da2eac
commit dce4c36f7b
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -425,6 +425,10 @@ func (h *handler) unregisterPeer(id string) {
}
}
func (h *handler) SetMaxPeers(maxPeers int) {
h.maxPeers = maxPeers
}
func (h *handler) Start(maxPeers int) {
h.maxPeers = maxPeers