appnexus / sicksync

Don’t accept the available as the preferable. Go the extra mile with extra speed.
Apache License 2.0
68 stars 11 forks source link

EADDRINUSE Bug #26

Closed joelgriffith closed 9 years ago

joelgriffith commented 9 years ago

Seems like folks are having issues with sicksync waking the devbox twice, and resulting in an EADDRINUSE error. Hopefully this fixes it, but it's hard to repro.

joelgriffith commented 9 years ago

This removes the bigSync calls inside of the websocket portion of the codebase and puts it into bin/local.js where it really should reside. Workflow is:

  1. Attempt to connect to ws server.
    • If it fails, awaken it.
  2. Connect to the ws server.
  3. Start a Big Sync.
  4. Once Big Sync is complete, start file-watch.

Hopefully this'll stop the race conditions as we now only awaken the devbox in one place.