JayThomason / Tutti

Tutti is a shared music application for the car being made in conjunction with Audi.
3 stars 1 forks source link

Bug: Race condition between ping and setMasterIp on client #222

Closed JayThomason closed 10 years ago

JayThomason commented 10 years ago

There is probably a more elegant way to solve this but right now I have added an isActive field to the client object which denotes whether the client is 'active' yet. A client is declared active once it has requested the local library from the master. Pings (and other changes) should only be pushed to the client once it is active, otherwise there may be race conditions where the master tries to access the client's server API but the client has not yet started its server.

JayThomason commented 10 years ago

https://github.com/JayThomason/Tutti/commit/6e7456ba3840e3f39295515486ca329f201d4bc7