mirror of
https://github.com/zrepl/zrepl.git
synced 2025-08-17 02:11:03 +02:00
rpc rewrite: control RPCs using gRPC + separate RPC for data transfer
transport/ssh: update go-netssh to new version => supports CloseWrite and Deadlines => build: require Go 1.11 (netssh requires it)
This commit is contained in:
19
rpc/dataconn/timeoutconn/timeoutconn_debug.go
Normal file
19
rpc/dataconn/timeoutconn/timeoutconn_debug.go
Normal file
@ -0,0 +1,19 @@
|
||||
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))
|
||||
}
|
Reference in New Issue
Block a user