Taken from karma-runner/gulp-karma#5
There is a setTimeout in socket.io (https://github.com/Automattic/socket.io/blob/0.9/lib/transport.js#L216) that prevents Karma from exiting. Interestingly this timeout prevents Karma from exiting on Windows only, OSX and Linux is not affected.
Yesterday my colleague have discovered that this could be worked-around by explicitly disconnecting each socket on Karma exit (basically adding sockets[key].disconnect() here: https://github.com/karma-runner/karma/blob/v0.12.16/lib/server.js#L201). I'm not familiar with the socket.io internals well enough so I'm not sure if this is the right thing to do, but I'm kind of loosing hope of having any fixes done in the socket.io version that Karma is using atm.
Would be grateful for any input here, especially from the ones knowing karma + socket.io interactions a bit better.
Taken from karma-runner/gulp-karma#5
There is a setTimeout in socket.io (https://github.com/Automattic/socket.io/blob/0.9/lib/transport.js#L216) that prevents Karma from exiting. Interestingly this timeout prevents Karma from exiting on Windows only, OSX and Linux is not affected.
Yesterday my colleague have discovered that this could be worked-around by explicitly disconnecting each socket on Karma exit (basically adding
sockets[key].disconnect()here: https://github.com/karma-runner/karma/blob/v0.12.16/lib/server.js#L201). I'm not familiar with the socket.io internals well enough so I'm not sure if this is the right thing to do, but I'm kind of loosing hope of having any fixes done in the socket.io version that Karma is using atm.Would be grateful for any input here, especially from the ones knowing karma + socket.io interactions a bit better.