aboutsummaryrefslogtreecommitdiff
path: root/pipeln.go
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2021-02-14 12:45:01 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2021-02-14 12:45:01 +0000
commitae2def146399745a8dba5113d5e1b57292a258e8 (patch)
tree2acb89dd7874d9d4d214f6b84307cb1a6c0a6e4a /pipeln.go
parent37aca255931ccb4bc35dc3bd0f32f8e8ada24e6e (diff)
Add README.md
Diffstat (limited to 'pipeln.go')
-rw-r--r--pipeln.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pipeln.go b/pipeln.go
index 507ab33..c836f28 100644
--- a/pipeln.go
+++ b/pipeln.go
@@ -62,10 +62,10 @@ func (ln *PipeListenerDialer) Dial(_, addr string) (net.Conn, error) {
}
s, c := net.Pipe()
select {
- case <-ln.done:
- return nil, ErrClosed
case ln.conns <- s:
return c, nil
+ case <-ln.done:
+ return nil, ErrClosed
}
}