Commit 92e791aa authored by Yuzhu Shen's avatar Yuzhu Shen Committed by Commit Bot

Minor changes to the connection errors section of Mojo bindings docs.

BUG=None

Change-Id: I4f0c8fd5a24a5bfc1f3a81c96026a33c7700639e
Reviewed-on: https://chromium-review.googlesource.com/538980
Commit-Queue: Yuzhu Shen <yzshen@chromium.org>
Reviewed-by: default avatarRandy Smith <rdsmith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481024}
parent 9b8f6e49
......@@ -366,10 +366,18 @@ parameters.
### Connection Errors
If there are no remaining messages available on a pipe and the remote end has
been closed, a connection error will be triggered on the local end. Connection
errors may also be triggered by automatic forced local pipe closure due to
*e.g.* a validation error when processing a received message.
If a pipe is disconnected, both endpoints will be able to observe the connection
error (unless the disconnection is caused by closing/destroying an endpoint, in
which case that endpoint won't get such a notification). If there are remaining
incoming messages for an endpoint on disconnection, the connection error won't
be triggered until the messages are drained.
Pipe disconnecition may be caused by:
* Mojo system-level causes: process terminated, resource exhausted, etc.
* The bindings close the pipe due to a validation error when processing a
received message.
* The peer endpoint is closed. For example, the remote side is a bound
`mojo::InterfacePtr<T>` and it is destroyed.
Regardless of the underlying cause, when a connection error is encountered on
a binding endpoint, that endpoint's **connection error handler** (if set) is
......
......@@ -141,10 +141,18 @@ the service side sends back a response. It is rejected if the interface is
disconnected.
### Connection Errors
If there are no remaining messages available on a pipe and the remote end has
been closed, a connection error will be triggered on the local end. Connection
errors may also be triggered by automatic forced local pipe closure due to
*e.g.* a validation error when processing a received message.
If a pipe is disconnected, both endpoints will be able to observe the connection
error (unless the disconnection is caused by closing/destroying an endpoint, in
which case that endpoint won't get such a notification). If there are remaining
incoming messages for an endpoint on disconnection, the connection error won't
be triggered until the messages are drained.
Pipe disconnecition may be caused by:
* Mojo system-level causes: process terminated, resource exhausted, etc.
* The bindings close the pipe due to a validation error when processing a
received message.
* The peer endpoint is closed. For example, the remote side is a bound interface
pointer and it is destroyed.
Regardless of the underlying cause, when a connection error is encountered on
a binding endpoint, that endpoint's **connection error handler** (if set) is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment