Skip to content

path property and API connection semantics - #21

Merged
mehaase merged 1 commit into
python-trio:masterfrom
belm0:path_and_handler_semantics
Sep 12, 2018
Merged

mehaase merged 1 commit into
python-trio:masterfrom
belm0:path_and_handler_semantics

Conversation

@belm0

@belm0 belm0 commented Sep 9, 2018 •

Copy link
Copy Markdown
Member

The server connection handler is now called only in the case
where the HTTP upgrade to websocket was successful. This
ensures that the WebSocketConnection path property is valid
and seems appropriate given that the API only propagates
message events.

Likewise, receiving a WebSocketConnection from connect()
implies a successful handshake.

Also cleaned up shutdown of client example, avoiding sys.exit()
from within a task.

Fixes #17

@belm0 belm0 changed the title path property and API connection semantics (fixes #17) path property and API connection semantics Sep 9, 2018
semantics of the server connection handler and
client connect().

The server connection handler is now called only in the case
where the HTTP upgrade to websocket was successful.  This
ensures that the WebSocketConnection path property is valid
and seems appropriate given that the API only propagates
message events.

Likewise, receiving a WebSocketConnection from connect()
implies a successful handshake.

Also cleaned up shutdown of client example, avoiding
sys.exit() from within a task.
@belm0
belm0 force-pushed the path_and_handler_semantics branch from 6543add to 2762972 Compare September 9, 2018 13:53
@mehaase

mehaase commented Sep 12, 2018

Copy link
Copy Markdown
Contributor

This is great! Thank you.

@mehaase
mehaase merged commit 2431751 into python-trio:master Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants