coreos/go-etcd — pull request #47 by 3XX0 (2013-10-29 16:29:03+00:00)
Title: watchOnce: Avoid defunct goroutine

Avoid three goroutines to go defunct due to a stop event.
The patch is quite straightforward, there may be a better solution using another channel to avoid panicking.

```
goroutine 1 [running]:
main.main()
/home/exxo/go-etcd/src/main/main.go:32 +0x284

goroutine 7 [chan receive]:
net/http.(*persistConn).readLoop(0xc2000b8500)
/usr/lib/go/src/pkg/net/http/transport.go:761 +0x64b
created by net/http.(*Transport).dialConn
/usr/lib/go/src/pkg/net/http/transport.go:511 +0x574

goroutine 8 [select]:
net/http.(*persistConn).writeLoop(0xc2000b8500)
/usr/lib/go/src/pkg/net/http/transport.go:774 +0x26f
created by net/http.(*Transport).dialConn
/usr/lib/go/src/pkg/net/http/transport.go:512 +0x58b

goroutine 10 [chan send]:
etcd.func·001()
/home/exxo/go-etcd/src/etcd/watch.go:64 +0xd4
created by etcd.(*Client).watchOnce
/home/exxo/go-etcd/src/etcd/watch.go:65 +0x16c
```