{"action":"closed","issue":{"url":"https://api.github.com/repos/Fuyukai/asyncwebsockets/issues/2","repository_url":"https://api.github.com/repos/Fuyukai/asyncwebsockets","labels_url":"https://api.github.com/repos/Fuyukai/asyncwebsockets/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Fuyukai/asyncwebsockets/issues/2/comments","events_url":"https://api.github.com/repos/Fuyukai/asyncwebsockets/issues/2/events","html_url":"https://github.com/Fuyukai/asyncwebsockets/issues/2","id":302573390,"node_id":"MDU6SXNzdWUzMDI1NzMzOTA=","number":2,"title":"exception for the example","user":{"login":"guanqun","id":53862,"node_id":"MDQ6VXNlcjUzODYy","avatar_url":"https://avatars0.githubusercontent.com/u/53862?v=4","gravatar_id":"","url":"https://api.github.com/users/guanqun","html_url":"https://github.com/guanqun","followers_url":"https://api.github.com/users/guanqun/followers","following_url":"https://api.github.com/users/guanqun/following{/other_user}","gists_url":"https://api.github.com/users/guanqun/gists{/gist_id}","starred_url":"https://api.github.com/users/guanqun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guanqun/subscriptions","organizations_url":"https://api.github.com/users/guanqun/orgs","repos_url":"https://api.github.com/users/guanqun/repos","events_url":"https://api.github.com/users/guanqun/events{/privacy}","received_events_url":"https://api.github.com/users/guanqun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-06T05:55:48Z","updated_at":"2018-08-10T16:45:12Z","closed_at":"2018-08-10T16:45:12Z","author_association":"NONE","body":"When I run the example, it raises the exception:\r\n\r\n```\r\n....\r\n  File \"~/lib/python3.6/site-packages/trio/_ssl.py\", line 416, in _check_status\r\n    raise ClosedStreamError\r\ntrio.ClosedStreamError\r\n```\r\n\r\nIs this the expected behavior?\r\n\r\nI'm using trio 0.3.0\r\n\r\n```\r\nimport multio\r\n\r\nfrom asyncwebsockets.client import connect_websocket\r\nfrom asyncwebsockets.ws import WebsocketConnectionEstablished, WebsocketBytesMessage\r\n\r\n\r\nasync def test():\r\n    sock = await connect_websocket(\"wss://echo.websocket.org\", reconnecting=False)\r\n    async for message in sock:\r\n        print(\"Event received\", message)\r\n        if isinstance(message, WebsocketConnectionEstablished):\r\n            await sock.send_message(b\"test\")\r\n\r\n        elif isinstance(message, WebsocketBytesMessage):\r\n            print(\"Got response:\", message.data)\r\n            await sock.close(code=1000, reason=\"Thank you!\")\r\n\r\n\r\nmultio.init(\"trio\")\r\nmultio.run(test)\r\n```"}}
{"actor":{"display_login":"Fuyukai"}}