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

Remove socket files #113

Merged
merged 3 commits into from
Jan 13, 2020
Merged

Remove socket files #113

merged 3 commits into from
Jan 13, 2020

Conversation

Kifen
Copy link
Contributor

@Kifen Kifen commented Jan 9, 2020

Fixes #93

Changes:

  • Added method to unlink socket files.
  •  Checks on startup of a node if socket file exists, if it does, remove it
    

How to test this PR:

  • Run an integration env
    
  • Stop a node with Ctrl-c or close the env via tmux kill-session -t skywire
    
  • Restart the env, error bind address already in use doesn't occur
    

@jdknives
Copy link
Member

jdknives commented Jan 9, 2020

@Kifen binary file uploaded.

@jdknives
Copy link
Member

jdknives commented Jan 9, 2020

Also the replace should be re-commentend.

Copy link
Contributor

@Darkren Darkren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great one! But if we use syscall here anyway, what do you think about getting rid of os.Stat call? We may just call Unlink and filter out ENOENT error in case file doesn't exist. Just a suggestion

Copy link
Contributor

@nkryuchkov nkryuchkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Please fix linter error adding a comment to UnlinkSockFile.

@Darkren
Copy link
Contributor

Darkren commented Jan 9, 2020

@Kifen also shouldn't we remove also the dmsgpty socket? I'm not sure it's probably being removed already, but at least we should check if it really is

Copy link
Contributor

@Darkren Darkren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@jdknives jdknives closed this Jan 13, 2020
@jdknives jdknives reopened this Jan 13, 2020
@jdknives jdknives merged commit b68b5c6 into skycoin:milestone2 Jan 13, 2020
@Kifen Kifen deleted the rm-sockfiles branch January 13, 2020 09:45
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.

4 participants