ssbc / ssb-conn

SSB plugin for establishing and managing peer connections
MIT License
16 stars 5 forks source link

Peers connecting after stop #12

Closed christianbundy closed 4 years ago

christianbundy commented 4 years ago

As discussed in https://github.com/fraction/oasis/pull/92, I've recently been bumping into some trouble when calling conn.stop over MuxRPC. It seems that it kills off some connections, but it's often the case that there's still one leftover connection. After watching the output of conn.peers it looks to me like this is a new connection -- maybe conn.stop isn't preventing new connections from being made?

I was able to reproduce with ssb conn peers in one terminal and running ssb conn stop in another. Here's a screen recording: https://asciinema.org/a/4OLLInPfIdRJcGafIRC9LYUnJ

staltz commented 4 years ago

@christianbundy Thanks!

Try ssb-conn@0.15.2-rc0 freshly published

christianbundy commented 4 years ago

Looks great! https://asciinema.org/a/hAzK2Z0v0vqRGALaMfx2c9JvJ

Damn, that was fast.

staltz commented 4 years ago

My intuition for how to solve this one was strong, that's why it was fast. Also, I'm at the computer.

I still suspect that ssb-conn won't happily handle multiple start/stop cycles (e.g. maybe after the 100th start you might experience issues), because stop doesn't abort the previous pull-drains, they will keep on lingering. I'll open an issue for that.

Anyway, I'll release 0.15.2 non-rc now for you.