浏览代码

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)
Solomon Hykes 11 年之前
父节点
当前提交
e512fef425
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      pkg/beam/examples/beamsh/beamsh.go

+ 1 - 2
pkg/beam/examples/beamsh/beamsh.go

@@ -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()
 			}