do not crash if the service was never started

fixes #51
This commit is contained in:
Girish Ramakrishnan
2016-09-15 11:53:28 -07:00
parent 7f2eadcd4e
commit a40abaf1a0
3 changed files with 3 additions and 3 deletions

View File

@@ -192,5 +192,5 @@ function start(callback) {
function stop(callback) {
assert.strictEqual(typeof callback, 'function');
gHttpServer.close(callback);
if (gHttpServer) gHttpServer.close(callback);
}