-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipfs add fails when routing partner goes offline #418
Comments
This is interesting... mostly likely because that peer doesnt get removed in our local routing table. |
a) Do we need the swarm/network/service to call up to the client letting it know about the disconnection? b) Or should the client discover the disconnection/unreachability when the client attempts to send a message out over the service? With (a), there is a TOCTOU concern. With (b), it's kind of an awkward interface. |
I agree b) is awkward. (which is why just sending messages is weird. we don't live in a world with constant connectivity yet). I think TRTTD is a). This is where we really should have events (pub/sub (or NSNotificationCenter) style).
Not sure this is the easiest route to go here, given it introduces a whole new way of passing information around that's not there presently. But it may not be too bad. I think we should eventually have a notification center (per node) abstraction. |
I'll fix this issue using a system-wide notification center or pubsub. It won't be feature rich, but it'll be a foundation cognizant of broader constraints. |
@maybebtc add it to the IpfsNode, and either hand it down in the context, or add it to the major subsystems that need it. |
SGTM |
@briantigerchow this is still a problem eh? |
Don't know for sure. Probably. Needs a test.
I suppose we want routing, bitswap, blockservice, etc. to respond wisely to the network errors that occur. |
Absolutely. That sounds good to me. |
I'll DRI this one. |
fixed in #424 |
feat: refresh and wait
repro:
add
command hangs and failsThe text was updated successfully, but these errors were encountered: