()
| 263 | } |
| 264 | |
| 265 | func (c communicator) loopReq() { |
| 266 | ctx := c.stream.Context() |
| 267 | defer close(c.reqs) |
| 268 | for { |
| 269 | req, err := c.stream.Recv() |
| 270 | if err != nil { |
| 271 | c.logger.Debug(ctx, "error receiving requests from DRPC stream", slog.Error(err)) |
| 272 | return |
| 273 | } |
| 274 | err = SendCtx(ctx, c.reqs, req) |
| 275 | if err != nil { |
| 276 | c.logger.Debug(ctx, "context done while sending coordinate request", slog.Error(ctx.Err())) |
| 277 | return |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | func (c communicator) loopResp() { |
| 283 | ctx := c.stream.Context() |