Skip to content

Commit

Permalink
Revert "client: use bigger TTL, expose it to clients" (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov authored Mar 12, 2024
2 parents 6c908f3 + 733b578 commit 152cf26
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions client/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ const (
fieldNumSigPubKey = 1
fieldNumSigVal = 2
fieldNumSigScheme = 3

// DefaultTTL is a TTL used for NeoFS requests if no other value is
// set specifically for a call. It limits the number of hops the
// request can transit (see specification for details).
DefaultTTL = 8
)

// groups meta parameters shared between all Client operations.
Expand Down Expand Up @@ -125,7 +120,7 @@ func (x contextCall) prepareRequest() {
}

if meta.GetTTL() == 0 {
meta.SetTTL(DefaultTTL)
meta.SetTTL(2)
}

if meta.GetVersion() == nil {
Expand All @@ -142,7 +137,7 @@ func (x contextCall) prepareRequest() {
func (c *Client) prepareRequest(req request, meta *v2session.RequestMetaHeader) {
ttl := meta.GetTTL()
if ttl == 0 {
ttl = DefaultTTL
ttl = 2
}

verV2 := meta.GetVersion()
Expand Down

0 comments on commit 152cf26

Please sign in to comment.