MCPcopy
hub / github.com/dropbox/godropbox / StripDeadline

Function StripDeadline

context2/context.go:97–99  ·  view source on GitHub ↗

Creates a child context that has no Deadline() metadata. The child will still get cancelled if the parent's context deadline expires, or if the parent gets cancelled. This is a workaround for Courier's deadline propagation. The Courier client implementation will look at the Deadline() on the contex

(parent context.Context)

Source from the content-addressed store, hash-verified

95// has an Err() set, and, if so, you can safely write the other error from the outbound RPC off as
96// irrelevant.
97func StripDeadline(parent context.Context) context.Context {
98 return &deadlineStrippedCtx{parent}
99}
100
101type deadlineStrippedCtx struct {
102 wrapped context.Context

Callers 1

TestStripDeadlineFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestStripDeadlineFunction · 0.68