Skip to content

setTimout in socket.io prevents Karma from exiting on Windows #1109

Closed

Description

@pkozlowski-opensource

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.

Activity

  1. changed the title [-]setTimout in socket.io prevents Karma from existing on Windows[/-] [+]setTimout in socket.io prevents Karma from exiting on Windows[/+] on Jul 1, 2014
  2. added 2 commits that reference this issue on Jul 1, 2014
    83b1a48
    28239f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions