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

delete socket file after accidental crash #27

Closed
wants to merge 2 commits into from

Conversation

strogiyotec
Copy link
Contributor

If pomo was closed because of system crash or termination then .sock file still exists which doesn't allow a new pomo instance to start with the following error

bind: address already in use

How to reproduce

  1. Start pomo
  2. Close terminal

I added new conditions to check if .sock file already exists and if another pomo instance is listening the .sock file

@kevinschoon
Copy link
Owner

This PR looks great but I haven't been able to verify the ability to delete multiple tasks yet. Maybe we should add a test case for it?

@strogiyotec
Copy link
Contributor Author

@kevinschoon I will create a test case then, thank you for response

@strogiyotec
Copy link
Contributor Author

@kevinschoon I wasn't able to run tests for existing app
How to reproduce

go test
# github.com/kevinschoon/pomo [github.com/kevinschoon/pomo.test]
./runner_test.go:21:30: too many arguments in call to NewTaskRunner
	have (*Task, *Store, NoopNotifier)
	want (*Task, *Config)
FAIL	github.com/kevinschoon/pomo [build failed]

Will try to fix this test as well

@strogiyotec
Copy link
Contributor Author

@kevinschoon I think it does make sense to create different pull requests for different features, let me create a pull request to fix sock file problem , after that I will create another one where I will fix runner_test.go file and third one where I will add multiple deletion feature

@strogiyotec strogiyotec closed this Sep 6, 2020
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.

None yet

2 participants