Skip to content
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

spawn without hearbeats #208

Closed
qnikst opened this issue Jun 17, 2015 · 1 comment
Closed

spawn without hearbeats #208

qnikst opened this issue Jun 17, 2015 · 1 comment

Comments

@qnikst
Copy link
Contributor

qnikst commented Jun 17, 2015

It looks like n-t-tcp does not implement heartbeats, nor does the n-t documentation ask for that. Yet, spawn seems to rely on monitoring to learn of disconnections.

spawn uses delay, which won't run the spawned process unless it gets either a monitor notification or an ack from the caller. On the other hand, the caller can complete the call to spawn before the ack to delay arrives. If a disconnection occurs at this point, the spawned process will block indefinitely.

A simple fix is to stop using delay, and ask the user to take extra precautions if the spawned action is killing the remote node.

A simple workaround is to have the user use spawnAsync directly.


If call starts using cpDelayed as proposed in #183, the spawned process could block indefinitely if there is a disconnection. The call to call would not complete, but there wouldn't be a way to interrupt it while avoiding leaking the spawned process.

A fix for this could be to give up monitoring the spawned process and avoid using cpDelayed.

Thoughts?

@qnikst
Copy link
Contributor Author

qnikst commented Jun 18, 2015

Dublicate of #197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant