diff --git a/pkg/port/iscsit/conn.go b/pkg/port/iscsit/conn.go index a8aed77..f9b0775 100644 --- a/pkg/port/iscsit/conn.go +++ b/pkg/port/iscsit/conn.go @@ -17,6 +17,7 @@ limitations under the License. package iscsit import ( + "io" "net" "sort" "sync" @@ -122,7 +123,7 @@ func (c *iscsiConnection) init() { func (c *iscsiConnection) readData(size int) ([]byte, int, error) { var buf = make([]byte, size) - length, err := c.conn.Read(buf) + length, err := io.ReadFull(c.conn, buf) if err != nil { return nil, -1, err }