muellmusik / Utopia

This is an attempt at a generic library of tools for making Network Music Apps in SuperCollider
43 stars 8 forks source link

Hail does not account for port changes on recompile #9

Closed muellmusik closed 9 years ago

muellmusik commented 10 years ago

If a client crashes, or needs to do a hard restart of the interpreter, it is possible that it will rejoin the Utopia with a different lang port number. As it stands, Hail checks if the name exists in its AddrBook and only sets online status if it does. This means that the port in the AddrBook will be wrong, and you'll get access from unrecognised address warnings, etc.

I think the simplest solution is to check if the peer is offline, and if so reauthenticate and add again. That would also handle cases where the address changed for some reason (rather more unlikely, but possible if a restart was required and network membership is changeable). Note that authentication is a no-op by default, so there'd be no overhead in normal usage.

Any other thoughts?