mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-28 19:34:58 +01:00
796c5ad42d
transport/ssh: update go-netssh to new version => supports CloseWrite and Deadlines => build: require Go 1.11 (netssh requires it)
20 lines
372 B
Go
20 lines
372 B
Go
package timeoutconn
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
const debugReadvNoShortReadsAssertEnable = false
|
|
|
|
func debugReadvNoShortReadsAssert(expectedLen, returnedLen int64, returnedErr error) {
|
|
readShort := expectedLen != returnedLen
|
|
if !readShort {
|
|
return
|
|
}
|
|
if returnedErr != io.EOF {
|
|
return
|
|
}
|
|
panic(fmt.Sprintf("ReadvFull short and error is not EOF%v\n", returnedErr))
|
|
}
|