streamSubscriberControlFetchContext keeps a control-path lookup tied to the requesting subscriber while applying a fallback timeout when the caller has no deadline.
(ctx context.Context)
| 4902 | // requesting subscriber while applying a fallback timeout when the caller has |
| 4903 | // no deadline. |
| 4904 | func streamSubscriberControlFetchContext(ctx context.Context) (context.Context, context.CancelFunc) { |
| 4905 | if _, ok := ctx.Deadline(); ok { |
| 4906 | return ctx, func() {} |
| 4907 | } |
| 4908 | return context.WithTimeout(ctx, chatStreamControlFetchTimeout) |
| 4909 | } |
| 4910 | |
| 4911 | func subscribeWithInitialError(chatID uuid.UUID, message string) ( |
| 4912 | []codersdk.ChatStreamEvent, |