- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for SetDeadline (0.14 sec)
-
internal/grid/grid.go
b = b[:len(b)+n] if err != nil { if errors.Is(err, io.EOF) { err = nil } return b, err } } } // getDeadline will truncate the deadline so it is at least 1ms and at most MaxDeadline. func getDeadline(d time.Duration) time.Duration { if d < time.Millisecond { return 0 } if d > MaxDeadline { return MaxDeadline } return d }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 02 15:56:18 GMT 2024 - 4.8K bytes - Viewed (0) -
internal/grid/connection.go
func (c *Connection) newMuxClient(ctx context.Context) (*muxClient, error) { client := newMuxClient(ctx, atomic.AddUint64(&c.NextID, 1), c) if dl, ok := ctx.Deadline(); ok { client.deadline = getDeadline(time.Until(dl)) if client.deadline == 0 { client.cancelFn(context.DeadlineExceeded) return nil, context.DeadlineExceeded } } for { // Handle the extremely unlikely scenario that we wrapped.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 42.6K bytes - Viewed (0)