client.go | 6 ++++++ diff --git a/client.go b/client.go index 5ae32af67d99042af1451d42f31587be511414e3..47bd03d812d8091d35092da1cdf8b9320beed0eb 100644 --- a/client.go +++ b/client.go @@ -368,6 +368,12 @@ } return "" } +func (cl *Client) Closed() <-chan struct{} { + cl.mu.Lock() + defer cl.mu.Unlock() + return cl.closed.C() +} + // Stops the client. All connections to peers are closed and all activity will // come to a halt. func (cl *Client) Close() {