projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f81f57
)
Expose Client.Closed
author
Matt Joiner <anacrolix@gmail.com>
Thu, 8 Feb 2018 12:57:53 +0000 (23:57 +1100)
committer
Matt Joiner <anacrolix@gmail.com>
Thu, 8 Feb 2018 12:57:53 +0000 (23:57 +1100)
client.go
patch
|
blob
|
history
diff --git
a/client.go
b/client.go
index 5ae32af67d99042af1451d42f31587be511414e3..47bd03d812d8091d35092da1cdf8b9320beed0eb 100644
(file)
--- a/
client.go
+++ b/
client.go
@@
-368,6
+368,12
@@
func firstNonEmptyString(ss ...string) string {
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() {