Skip to content

Commit bd6fdfe

Browse files
craig[bot]shubhamdhama
andcommitted
Merge #157208
157208: rpc: fix DialRPC when NoLoopbackDialer is true r=shubhamdhama a=shubhamdhama If NoLoopbackDialer is true, then loopbackDRPCDialFn would return the error "loopback dialer called but NoLoopbackDialer was set". This was causing problem with sysbench benchmarks. Fixes: none Epic: none Release note: none Co-authored-by: Shubham Dhama <[email protected]>
2 parents d90b48f + f9df299 commit bd6fdfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/rpc/drpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func DialDRPC(
5555
_ struct{}) (drpcpool.Conn, error) {
5656

5757
netConn, err := func(ctx context.Context) (net.Conn, error) {
58-
if rpcCtx.ContextOptions.AdvertiseAddr == target && !rpcCtx.ClientOnly {
58+
if rpcCtx.ContextOptions.AdvertiseAddr == target && rpcCtx.canLoopbackDial() {
5959
return rpcCtx.loopbackDRPCDialFn(ctx)
6060
}
6161
return drpcmigrate.DialWithHeader(ctx, "tcp", target, drpcmigrate.DRPCHeader)

0 commit comments

Comments
 (0)