Skip to content

fail gracefully when dat share is already running fixes #561#569

Merged
joehand merged 2 commits intomasterfrom
fail-graceful
Nov 16, 2016
Merged

fail gracefully when dat share is already running fixes #561#569
joehand merged 2 commits intomasterfrom
fail-graceful

Conversation

@okdistribute
Copy link
Copy Markdown
Collaborator

fixes #561

@joehand
Copy link
Copy Markdown
Collaborator

joehand commented Nov 16, 2016

Looks good to me! Thanks for putting those error functions in one place!

@max-mapper
Copy link
Copy Markdown
Collaborator

Nice and simple, do we need a test?

@okdistribute
Copy link
Copy Markdown
Collaborator Author

I tried adding a test but couldn't figure out how to trigger it, the simple stupid way of running a dat instance, not closing it, and opening another one with the same command was not working.

@juliangruber
Copy link
Copy Markdown
Collaborator

I tried adding a test but couldn't figure out how to trigger it, the simple stupid way of running a dat instance, not closing it, and opening another one with the same command was not working.

did you try with a child process too?

@joehand joehand merged commit 49b540e into master Nov 16, 2016
@joehand
Copy link
Copy Markdown
Collaborator

joehand commented Nov 16, 2016

added a test

@joehand joehand deleted the fail-graceful branch November 16, 2016 19:06
@okdistribute
Copy link
Copy Markdown
Collaborator Author

thanks @joehand ! I forgot the {end: false}!

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

Successfully merging this pull request may close these issues.

dat should fail gracefully if another dat is already open on that dir

4 participants