c4milo / node-webkit-agent

NodeJS agent for WebKit devtools front-end
http://c4milo.github.io/node-webkit-agent/
1.09k stars 78 forks source link

only stop nodeAgent if it has started #48

Closed vvo closed 10 years ago

vvo commented 10 years ago

When process exits, stop nodeAgent only if it has started

vvo commented 10 years ago

I was wondering why I got "stop server" when exiting without having the nodeAgent started.

Dunno if it makes sense, if it does, please publish :-)

c4milo commented 10 years ago

That is odd because .stop() is already making sure a server was started before attempting to close it: https://github.com/vvo/node-webkit-agent/blob/master/index.js#L163-L181

vvo commented 10 years ago

I wanted to get rid of uneeded console.log() when I did not start the server, maybe I should just move console.log() upper?

c4milo commented 10 years ago

this one? https://github.com/vvo/node-webkit-agent/blob/master/index.js#L180

vvo commented 10 years ago

yes exactly, when you do not start debugging and process stops, you still get the console.log

vvo commented 10 years ago

@c4milo can we find a solution to fix this? Do you want me to change my PR?

c4milo commented 10 years ago

Haha, sorry man, I've been traveling. Sure, just move the console.log line inside the conditional where it is checking of server is defined in the stop() function.

c4milo commented 10 years ago

BTW, I'll be in France in April. I hope to see you there!

c4milo commented 10 years ago

Alright @vvo, it should be fixed in v0.2.3. Sorry for the delay.

vvo commented 10 years ago

@c4milo Thank you, I did not take the time to fix my PR. As for April it would be amazing to meet you. Drop me an email before you arrive: vincent@zeroload.net