Dmitriy Ryajov b2ea5a3c77
Concurrent upgrades (#489)
* adding an upgraded event to conn

* set stopped flag asap

* trigger upgradded event on conn

* set concurrency limit for accepts

* backporting semaphore from tcp-limits2

* export unittests module

* make params explicit

* tone down debug logs

* adding semaphore tests

* use semaphore to throttle concurent upgrades

* add libp2p scope

* trigger upgraded event before any other events

* add event handler for connection upgrade

* cleanup upgraded event on conn close

* make upgrades slot release rebust

* dont forget to release slot on nil connection

* misc

* make sure semaphore is always released

* minor improvements and a nil check

* removing unneeded comment

* make upgradeMonitor a non-closure proc

* make sure the `upgraded` event is initialized

* handle exceptions in accepts when stopping

* don't leak exceptions when stopping accept loops
2021-01-04 12:59:05 -06:00
..
2020-12-20 00:45:34 +09:00
2021-01-04 12:59:05 -06:00
2020-11-12 21:44:02 -06:00
2020-08-04 18:19:26 +09:00
2020-12-19 15:43:32 +01:00
2020-12-02 19:24:48 -06:00
2021-01-04 12:59:05 -06:00
2020-12-03 13:53:16 -06:00
2020-08-08 08:52:20 +02:00
2020-07-15 10:24:04 +02:00
2021-01-04 12:59:05 -06:00
2020-12-02 19:24:48 -06:00