throwing not_connected exception if failed to join network.