schickling / gulp-webserver

Streaming gulp plugin to run a local webserver with LiveReload
https://www.npmjs.org/package/gulp-webserver
MIT License
356 stars 84 forks source link

Emitting kill to stream does not kill livereload #95

Open chiel opened 9 years ago

chiel commented 9 years ago

Hello,

I'm using gulp-webserver to run end to end tests with gulp-protractor. Once the tests have been run I'd like to be able to shut the server down. However, it would appear that emitting kill to the stream does not kill off the livereload server.

The reason livereload is even enabled is because the server is also used during regular development. Of course I can use a quick fix and only run livereload when the server is not used in conjunction with the tests, but figured desired behaviour would be to kill livereload as well.

Cheers.

liabru commented 8 years ago

+1

yoaquim commented 8 years ago

+1, having same issue. trying to kill gulp-webserver once karma's done, but emitting the kill event does nothing.

DSoko2 commented 6 years ago

+1 In addition to the explanations of @chiel I figured out, that the exact issue is that the change detection via "watch" is not stopped on shutdown. The livereload server however is closed correctly. I'm going to propose a fix

DSoko2 commented 6 years ago

I republished the current version of gulp-webserver with #125 applied on global npm as @dsoko2/gulp-webserver for anyone, who also needs to have it fixed immediately. I will keep my fork close to the original project (if there should be updates) and deprecate it, when this issue is fixed in the original gulp-webserver on npm