runtime/internal/rpc: Fix args encoding racy error.

This change fixes the race condition described
https://github.com/vanadium/issues/issues/559.
The issue is when clients send a request header for an invalid
suffix/method, the clients racily return "encoding args" errors or
"suffix doesn't exist" errors from the server depending on whether
the client has completed encoding all of its args before the server
closes the flow.

The temporary fix is that the server will try to read all of the args
before encoding the error and closing the flow.

We should try to figure out a better way to solve this for RPC2:
https://github.com/vanadium/issues/issues/575

Change-Id: I78d68cdb2161dbdff13190b5c7d32968a352c0bf
1 file changed
tree: 62dc496cb4a7dd9dfd546dccce96ae04840a858d
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTORS
  11. envvar.go
  12. envvar_test.go
  13. LICENSE
  14. PATENTS
  15. README.md
  16. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.