Files
darkfi/src/net
draoi 9033567f00 net: stabilize HostState.unregister() calls
We previously deleted the call to `unregister()` after the refinery is
successful on a16dd562d9.

It was considered redundant since the `unregister()` call happens in
`subscribe_on_stop()`, which for refine session is called directly after
the refinery process finishes (after `channel.stop()`).

However, in a highly async environment the `unregister()` call in
`subscribe_on_stop()` can be called before the call to `move_host()`, meaning
that the host would then be stuck in the `Moving` state.

We have fixed this by specifying that `unregister` should only be called
in `subscribe_on_stop()` to peers that are not part of a refine session.
We seperately call `unregister` after `move_host` in the refinery.

This commit also fixes some documentation.

Note: the call to `unregister()` is highly fragile and can lead to race
conditions. We are working to replace this with something more robust
(like `tombstone()`).
2024-07-02 13:57:02 +02:00
..
2024-06-26 08:52:46 +02:00
2024-07-02 11:51:42 +02:00
2024-06-27 15:03:22 +02:00