aboutsummaryrefslogtreecommitdiff
path: root/pipeln.go
diff options
context:
space:
mode:
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
}
}