Added awaitClosed method to RemotingClient