func (pipe *Pipe) ExecPipe() {
// some write...
l, err := conn.Read(pipe.readBuf[:])
if err != nil {
for i := 0; i < pipe.queueSize; i++ {
pipe.Result <- Res{
Slice: nil,
Err: err,
}
}
pipe.queueSize = 0
return
}
offset := 0
size := 0
have := 0
defer func() {
if err := recover(); err != nil {
fmt.Printf("l : value = %[1]d, type = %[1]T\nsize: value = %[2]d, type = %[2]T\nhave: value = %[3]d, type = %[3]T\noffset+size: value = %[4]d, type = %[4]T\n", l, size, have, offset)
}
}()
.....
if have < size {
...
offset = 0
l += have
}
offset += size
if l - offset < 0 {
log.Printf("l : value = %[1]d, type = %[1]T\nsize: value = %[2]d, type = %[2]T\nhave: value = %[3]d, type = %[3]T\noffset+size: value = %[4]d, type = %[4]T\n", l, size, have, offset)
}
pipe.queueSize--
have = l - offset
if have < size {