holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.04k stars 84 forks source link

queue: remove peers on ban, exhaust #40

Closed indutny closed 4 years ago

indutny commented 4 years ago

When peers are banned or their reconnect attempts were exhausted or were disabled - they have to be queued for removal. Otherwise:

cc @mafintosh

davidmarkclements commented 4 years ago

CI is failing because this breaks two of the most complex tests - I'm happy to to look at them if you don't see an obvious fix for them, but would you mind adding a unit test for this behaviour?

indutny commented 4 years ago

I'm not sure if CI failure is a consequence of this commit. I've stashed my changes locally, but npm test was still failing with similar error.

davidmarkclements commented 4 years ago

ah ok - in that case we've had a regression somewhere - still if we can get a test for this it would be super useful

indutny commented 4 years ago

Does this test looks okay?

davidmarkclements commented 4 years ago

looks great - but can we copy paste that into new unit test test('requeue forget unresponsive'... so we retain the pre-existing case

indutny commented 4 years ago

Of course! Force pushed.

indutny commented 4 years ago

Thanks!

There is definitely no rush with this, but I would appreciate if you could do a release sometime soon. The long running desktop clients of my protocol have a lot of trouble reconnecting to each other, and I had to hot-patch the server to make it work for the major message channel there.

davidmarkclements commented 4 years ago

Ok, in that case I'm pretty confident that this is fine, so I'll merge - @mafintosh if you spot any problem we can always fix as a regression, I very much doubt that this will cause any issues elsewhere though

davidmarkclements commented 4 years ago

v2.1.1 released

indutny commented 4 years ago

Fantastic!!! Thank you!