def disconnect_from(network)
      connection = @connections.delete connection_to(network)
      connection.tap(&:stop).tap(&:join) unless connection.nil?
    end
def disconnect_from(network)
      connection = @connections.delete connection_to(network)
      connection.tap(&:stop).tap(&:join) unless connection.nil?
    end
Disconnects from a given network if the network is currently connected.

 @param network [Network] the network to disconnected from