Reconnect to discoverd when the connection drops

This needs to be protected by a mutex. *All* fields that are concurrently written and read must be protected by synchronization.