MCPcopy
hub / github.com/grpc/grpc-go / adjustParams

Method adjustParams

clientconn.go:1312–1321  ·  view source on GitHub ↗

adjustParams updates parameters used to create transports upon receiving a GoAway.

(r transport.GoAwayReason)

Source from the content-addressed store, hash-verified

1310// adjustParams updates parameters used to create transports upon
1311// receiving a GoAway.
1312func (ac *addrConn) adjustParams(r transport.GoAwayReason) {
1313 if r == transport.GoAwayTooManyPings {
1314 v := 2 * ac.dopts.copts.KeepaliveParams.Time
1315 ac.cc.mu.Lock()
1316 if v > ac.cc.keepaliveParams.Time {
1317 ac.cc.keepaliveParams.Time = v
1318 }
1319 ac.cc.mu.Unlock()
1320 }
1321}
1322
1323// resetTransportAndUnlock unconditionally connects the addrConn.
1324//

Callers 1

createTransportMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected