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

Unable to abort process after server restart #36

Closed
DaftMonk opened this issue Jan 15, 2014 · 3 comments · Fixed by #39
Closed

Unable to abort process after server restart #36

DaftMonk opened this issue Jan 15, 2014 · 3 comments · Fixed by #39

Comments

@DaftMonk
Copy link
Contributor

I have a watch task that restarts the server whenever a file is changed. When the server first starts I can use the abort command ctrl+c in the command prompt to stop the server.

However, if I trigger the watch task to restart the server, I am no longer able to abort the process. Discovered this issue while investigating angular-fullstack/generator-angular-fullstack#52

After experimenting with the code I found that I could fix this by editing the stop method in the grunt-express-server and removing this line:

    process.removeAllListeners();

I think that it must be removing the listener for the abort command.

@ericclemmons
Copy link
Owner

Good find! I'll check it out!

@DaftMonk
Copy link
Contributor Author

I appreciate it!

DaftMonk added a commit to DaftMonk/grunt-express-server that referenced this issue Jan 31, 2014
Was removing listener for ending process through ctrl+c.
Now only removes listeners added by the start method.

fixes ericclemmons#36
@DaftMonk
Copy link
Contributor Author

I'm sure you're very busy so I thought I'd add a PR for this.

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 a pull request may close this issue.

2 participants