jsonrpc2 icon indicating copy to clipboard operation
jsonrpc2 copied to clipboard

The context of `func (s *stream) Read(ctx context.Context) (Message, int64, error)` does nothing

Open zimmski opened this issue 3 years ago • 0 comments

I just banged my head against the keyboard for a while figuring out why a read operation of our language server is never canceled. Turns out that the "ctx" of "stream.Read" does nothing. One cannot cancel that read operation.

I was wondering why it is implemented like that?

I want to achieve the following:

  • Read as long there is data, or a timeout
  • If the timeout occurs stop reading

zimmski avatar Feb 19 '22 19:02 zimmski