This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年01月02日 02:15 by anacrolix, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| dispatcher_connect_addr.patch | anacrolix, 2012年01月02日 02:15 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg150449 - (view) | Author: Matt Joiner (anacrolix) | Date: 2012年01月02日 02:15 | |
Patch attached |
|||
| msg150455 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2012年01月02日 13:14 | |
I'm not sure how useful this is as addr will be set later, when connection is established. |
|||
| msg150487 - (view) | Author: Matt Joiner (anacrolix) | Date: 2012年01月03日 00:42 | |
I don't believe it is. dispatcher.addr is only set if the connection is immediately established. It's set explicitly in dispatcher.__init__ if a socket is provided that is already connected. It's *not* set after a connection completes. There are 2 solutions as I see it: 1) Set addr after a successful call to socket.connect indicates that a connection is being established. Currently this only occurs if the connection is not delayed. 2) Set the addr when a connect event completes. This would require making getpeername calls like in dispatcher.__init__ and would be significantly more expensive. My patch implements method 1. This conforms to existing addr-setting behaviour in dispatcher.bind. |
|||
| msg155914 - (view) | Author: Matt Joiner (anacrolix) | Date: 2012年03月15日 17:16 | |
I should mention that this failure to set addr is unusual seeing as most socket instances are wrapping AF_INET* domain sockets, and aren't likely to connect without blocking. This is quite likely a reason nobody has observed it until now. It *is* desirable to save addr at this point, as mentioned in previous comments. Additionally addr is public API insofar as asyncore.sockets are concerned. |
|||
| msg156414 - (view) | Author: Matt Joiner (anacrolix) | Date: 2012年03月20日 14:40 | |
This patch is a shoo-in, can someone review and commit this? |
|||
| msg156421 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年03月20日 15:44 | |
New changeset 1c0058991740 by Giampaolo Rodola' in branch 'default': Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr. http://hg.python.org/cpython/rev/1c0058991740 |
|||
| msg156422 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年03月20日 15:47 | |
New changeset 4e5ddde76dbe by Giampaolo Rodola' in branch '2.7': Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr. http://hg.python.org/cpython/rev/4e5ddde76dbe |
|||
| msg156423 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年03月20日 15:50 | |
New changeset a5add01e96be by Giampaolo Rodola' in branch '3.2': Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr. http://hg.python.org/cpython/rev/a5add01e96be |
|||
| msg156424 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2012年03月20日 15:51 | |
Done. Sorry for the delay. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:25 | admin | set | github: 57903 |
| 2012年03月20日 15:51:39 | giampaolo.rodola | set | status: open -> closed resolution: fixed messages: + msg156424 stage: patch review -> resolved |
| 2012年03月20日 15:50:04 | python-dev | set | messages: + msg156423 |
| 2012年03月20日 15:47:03 | python-dev | set | messages: + msg156422 |
| 2012年03月20日 15:44:37 | python-dev | set | nosy:
+ python-dev messages: + msg156421 |
| 2012年03月20日 14:40:18 | anacrolix | set | messages: + msg156414 |
| 2012年03月15日 17:16:52 | anacrolix | set | nosy:
+ akuchling messages: + msg155914 |
| 2012年01月03日 00:42:50 | anacrolix | set | messages: + msg150487 |
| 2012年01月02日 15:01:48 | rosslagerwall | set | nosy:
+ rosslagerwall |
| 2012年01月02日 13:14:03 | giampaolo.rodola | set | messages: + msg150455 |
| 2012年01月02日 12:59:18 | pitrou | set | nosy:
+ josiahcarlson, giampaolo.rodola, stutzbach stage: patch review versions: - Python 2.6, Python 3.1 |
| 2012年01月02日 02:15:15 | anacrolix | create | |