jsonrpc2
jsonrpc2 copied to clipboard
The context of `func (s *stream) Read(ctx context.Context) (Message, int64, error)` does nothing
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