Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

"stop" fails on Linux #141

Closed
Fraser999 opened this issue Jun 16, 2015 · 4 comments
Closed

"stop" fails on Linux #141

Fraser999 opened this issue Jun 16, 2015 · 4 comments
Assignees

Comments

@Fraser999
Copy link
Contributor

The stop command in the crust_peer example in Linux seems to no longer work.

@southsideGLA
Copy link

If I run multiple instances of
cargo run --example crust_peer
then the stop command works fine on all but the last remaining instance.
If I only run a single instance then it also fails and I require a ctrl-c to regain the prompt.
Latest git versions of all libs and last nights rust on Ubuntu 15.04

@chandraprakash
Copy link
Contributor

This might be related to shut-down of the beacon server. I have not yet looked into the code.
Its only the first node which acquires the beacon port (on a machine). I will update after investigating it.

@vinipsmaker
Copy link
Contributor

The code blocks on beacon.rs:L172/std::net::addr::SocketAddr::recv_from.

I'm studying the commit that introduced such feature to fix the issue.

@vinipsmaker
Copy link
Contributor

std::net::addr::SocketAddr::recv_from is used to wait for the other thread to finish cleanly. The problem is that the crust_peer example calls ConnectionManager::stop twice and BroadcastAcceptor::stop doesn't handle "double stop correctly". I'll write a patch soon.

vinipsmaker added a commit to vinipsmaker/crust that referenced this issue Jun 22, 2015
`std::net::addr::SocketAddr::recv_from` is used to wait for the other
thread to finish cleanly. The problem is that the `crust_peer` example
calls `ConnectionManager::stop` twice and `BroadcastAcceptor::stop`
doesn't handle "double stop correctly".

This commit avoids unnecessary and buggy calls to
`beacon::BroadcastAcceptor::stop`.

Fixes maidsafe-archive#141
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants