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

possible race condition: Unable to open connection to server on socket #6

Open
DavHau opened this issue Mar 28, 2022 · 0 comments
Open

Comments

@DavHau
Copy link

DavHau commented Mar 28, 2022

In a script where I'm doing this:

S="/$TMP/async_socket"
async -s="$S" server --start -j40
$async -s="$S" cmd -- bash -c "echo hello"

... I'm sometimes running into this:

Error: Unable to open connection to server on socket
sources-combined> Caused by IO error: No such file or directory (os error 2)

My guess is, that the async --start command doesn't ensure the socket file exists when exiting and only creates it shortly after.
If cmd is issued too quickly, it will not find the socket and error out.

A sleep 1 after the start command, seems to resolve the issue.
But this should better not be necessary.

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