Skip to content

Only call _proceed_ if coroutine exists#9

Open
alxchk wants to merge 1 commit intopgiri:masterfrom
alxchk:master
Open

Only call _proceed_ if coroutine exists#9
alxchk wants to merge 1 commit intopgiri:masterfrom
alxchk:master

Conversation

@alxchk
Copy link
Copy Markdown

@alxchk alxchk commented Jan 1, 2017

I met this issue when I tried to connect to IPv6 endpoint, and there were no route to do that.

@pgiri
Copy link
Copy Markdown
Owner

pgiri commented Jan 2, 2017

Thanks for the patch.

With this fix, have you managed to get it to work with IPv6? If so, I can pull this patch (actually, it would be nice if you can add same fix for 'py3' branch as well). However, I think the real cause for this error may be something else; the way async callbacks are setup and used by pollers, it shouldn't be necessary to check if coroutine is valid are not (at the time write task is called, the coroutine can't go away as the reference is held in 'write_coro'). It may be tricky to figure out what exactly is causing this error, so for now this fix can be committed and when I get a chance to setup IPv6 (or if you can figure out what the real problem is), proper fix can be committed.

@alxchk
Copy link
Copy Markdown
Author

alxchk commented Jan 2, 2017

Well, it's not connected to IPv6 directly, I just met it because of that. Likely there is issue with cleanup logic somewhere, but I'm not fluent with asyncoro internals, so just make "fix" at closest place :)

@pgiri
Copy link
Copy Markdown
Owner

pgiri commented Jan 2, 2017

Ah, ok. Let me see if I can setup IPv6 to try.

@alxchk
Copy link
Copy Markdown
Author

alxchk commented Jan 2, 2017

Actually you don't need this. Try to create AF_INET (ipv4) socket and then connect to IPv6 address

@pgiri
Copy link
Copy Markdown
Owner

pgiri commented Jan 4, 2017

I fixed SSL and added support for IPv6. I don't have any experience with IPv6, so likely what I did is not right. If you have experience with IPv6, could you check the changes? I have tested IPv6 with SSL on same machine (i.e., both client and server are on same interface).

To use IPv6, specify 'node="ipv6address"', or 'socket_family=socket.AF_INET6' to disasyncoro.AsyncCoro constructor.

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