beam/examples/beamsh: don't print discarded messages in Devnull
This avoids false alarms when process exits without printing. Devnull doesn't require synchronization. Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
parent
0f36b222f3
commit
7e73a97a41
1 changed files with 1 additions and 2 deletions
|
@ -87,11 +87,10 @@ func Devnull() (*net.UnixConn, error) {
|
|||
go func() {
|
||||
defer priv.Close()
|
||||
for {
|
||||
payload, attachment, err := beam.Receive(priv)
|
||||
_, attachment, err := beam.Receive(priv)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(os.Stderr, "[devnull] discarding '%s'\n", data.Message(string(payload)).Pretty())
|
||||
if attachment != nil {
|
||||
attachment.Close()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue