this loop needs to respond to PINGs. some servers send them before the client is registered.