indutny / sticky-session

Sticky session balancer based on a `cluster` module
964 stars 99 forks source link

Code never run #33

Closed chesstrian closed 8 years ago

chesstrian commented 8 years ago

This can be a simple question, but why the message server started on 3000 port on code taken from example, never is shown?.

  // Worker code
  server.once('listening', function() {
    console.log('server started on 3000 port');
  });
indutny commented 8 years ago

Because the condition should be reversed! Sorry!

chesstrian commented 8 years ago

No matter where the code is put, never is called. Still the library works without this, but just wanted to know if there is a way to make it works.

indutny commented 8 years ago

Ouch, fixed! Please update to 1.0.1

chesstrian commented 8 years ago

Thanks @indutny, I implemented a simple example https://github.com/chesstrian/sticky-session-express.