From 1373ceb5d744ee345b9aeb4a253806d89b343b7a Mon Sep 17 00:00:00 2001 From: bemasher Date: Mon, 25 May 2015 01:43:20 -0600 Subject: [PATCH] Fix block read, reads might span writes to the pipe. --- recv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recv.go b/recv.go index 801affc35..bf4d6dcd3 100644 --- a/recv.go +++ b/recv.go @@ -138,7 +138,7 @@ func (rcvr *Receiver) Run() { return default: // Read new sample block. - _, err := in.Read(block) + _, err := io.ReadFull(in, block) if err != nil { log.Fatal("Error reading samples: ", err) }