diff options
author | max <max@tclers.tk> | 2011-05-27 18:36:26 (GMT) |
---|---|---|
committer | max <max@tclers.tk> | 2011-05-27 18:36:26 (GMT) |
commit | 19755ae8971d97cfc092add10ceed6ab40f011bd (patch) | |
tree | 5b12cad417abf5ef6fef83bebf42dca448b10e0f /tests/socket.test | |
parent | ba5939ea3bf47fc00db9172391b3d68e24539921 (diff) | |
download | tcl-19755ae8971d97cfc092add10ceed6ab40f011bd.zip tcl-19755ae8971d97cfc092add10ceed6ab40f011bd.tar.gz tcl-19755ae8971d97cfc092add10ceed6ab40f011bd.tar.bz2 |
Fix [socket -async] for DNS names with more than one address
Diffstat (limited to 'tests/socket.test')
-rw-r--r-- | tests/socket.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/socket.test b/tests/socket.test index 83bad09..1bb9b79 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -1699,6 +1699,28 @@ if {$remoteProcChan ne ""} { catch {close $commandSocket} catch {close $remoteProcChan} } +unset ::tcl::unsupported::socketAF +test socket-14.0 {async when server only listens on one address family} \ + -constraints [list socket supported_any] \ + -setup { + proc accept {s a p} { + global x + puts $s bye + close $s + set x ok + } + set server [socket -server accept -myaddr 127.0.0.1 0] + set port [lindex [fconfigure $server -sockname] 2] + } -body { + set client [socket -async localhost $port] + # fileevent $client readable [list set x [fconfigure $client -error]] + after 1000 {set x [fconfigure $client -error]} + vwait x + set x + } -cleanup { + close $server + close $client + } -result ok ::tcltest::cleanupTests flush stdout return |