Message6672
This is caused by the fact that the socket object doesn't have a sock_impl yet. That is only constructed later (in the listen method). Before that, getsockname() uses a meaningless hardcoded name and portnumber ("",0).
I've looked into it a bit and there doesn't seem an obvious way to fix the creation order of the sock_impl, because of the way Java's Socket objects are implemented (you have to pass the listen backlog size to the bind method, there doesn't seem to be a separate listen method).
However: IMO the getsockname method should create a sock_impl if it doesn't exist yet, with a 'guessed' listen backlog size (probably the default, 50) and return a sensible addresss+port, rather than the current behavior where a useless name+port is returned.
Thoughts? |
|
Date |
User |
Action |
Args |
2011-10-12 22:29:05 | irmen | set | messageid: <1318458545.27.0.982174992891.issue1806@psf.upfronthosting.co.za> |
2011-10-12 22:29:05 | irmen | set | recipients:
+ irmen |
2011-10-12 22:29:05 | irmen | link | issue1806 messages |
2011-10-12 22:29:04 | irmen | create | |
|