summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-18 05:01:45 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-18 05:01:45 -0400
commit6f3249a37812e4386299045c67a54bbf5bd6e358 (patch)
treeb4f68b8e49359a3d0215640ebae1039de415afc3
parent1336cb4238ff147e729d308d5287090c83b537af (diff)
Shoot, I needed to use ReadFull, not Read. Amature mistake.
-rw-r--r--proto/io.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/io.go b/proto/io.go
index ba54f75..34421b1 100644
--- a/proto/io.go
+++ b/proto/io.go
@@ -128,7 +128,7 @@ func Read(fd io.Reader, data interface{}) {
data.nslcdRead(fd)
case *[]byte:
if len(*data) > 0 {
- _, err := fd.Read(*data)
+ _, err := io.ReadFull(fd, *data)
if err != nil {
panic(err)
}