Open azzamsa opened 3 months ago
Thanks! I hope this helps others searching for the same error message.
There is a way to prevent this error, but it'd mean changing the API and would need some thought. Here are some ideas:
Node
's lifetime (but this is horrible for ergonomics)@matheus23 what do you think about simply printing a warning message if the node is dropped without being shutdown?
To me the behavior seems reasonable as it is, just difficult to discover.
@zicklag Hm. Yeah that's probably better.
Personally I'd like to think about if we can make this better still.
E.g. perhaps we can change the error message from Err(Open(RemoteDropped))
to something that helps the user by saying "Error: Cannot access node, it was possibly shut down or dropped already".
Hi, đ
I can reproduce
called Result::unwrap()
on anErr value: Open(RemoteDropped)
, every time I run the code below.@zicklag gives the fix for me and explains that:
This is the patch that was implemented based on the @zicklag guide.
Is there any way for Rust or Iroh to prevent this
Open(RemoteDropped)
error?