added spinlocking to server reconnections