kevinschoon / pomo

Pomodoro CLI
https://kevinschoon.github.io/pomo
MIT License
528 stars 46 forks source link

delete socket file after accidental crash #29

Closed strogiyotec closed 4 years ago

strogiyotec commented 4 years ago

If pomo was closed because of system crash or termination close 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

strogiyotec commented 4 years ago

@stephenwithav this PR has only feature related to .sock file

strogiyotec commented 4 years ago

@kevinschoon you are right, it could be simplified , I made another commit please check it out