diff options
| author | harald.oehlmann@elmicron.de <oehhar> | 2014-12-07 12:17:24 (GMT) |
|---|---|---|
| committer | harald.oehlmann@elmicron.de <oehhar> | 2014-12-07 12:17:24 (GMT) |
| commit | 4f711e851d1c21f461a4a6bdc7eefb8564da6c9a (patch) | |
| tree | 7d28ef3bee6ac92c8018ec42afa89c5e06db7a71 | |
| parent | 4b26f1d71b8c5f31369540835132f18591e3852c (diff) | |
| download | tcl-4f711e851d1c21f461a4a6bdc7eefb8564da6c9a.zip tcl-4f711e851d1c21f461a4a6bdc7eefb8564da6c9a.tar.gz tcl-4f711e851d1c21f461a4a6bdc7eefb8564da6c9a.tar.bz2 | |
test for bug [c6ed4acfd8]: running async socket connect with other connect established will block tcl as it goes in an infinite loop in vwait
| -rw-r--r-- | tests/socket.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/socket.test b/tests/socket.test index eeea044..4f90e51 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -2343,6 +2343,24 @@ test socket-14.17 {empty -sockname while [socket -async] connecting} \ catch {close $client} } -result {} +# test for bug c6ed4acfd8: running async socket connect with other connect +# established will block tcl as it goes in an infinite loop in vwait +test socket-14.18 {bug c6ed4acfd8: running async socket connect made other connect block} \ + -constraints {socket} \ + -body { + proc accept {channel address port} {} + set port [randport] + set ssock [socket -server accept $port] + set csock1 [socket -async localhost [randport]] + set csock2 [socket localhost $port] + after 1000 {set done ok} + vwait done +} -cleanup { + catch {close $ssock} + catch {close $csock1} + catch {close $csock2} + } -result {} + set num 0 set x {localhost {socket} 127.0.0.1 {supported_inet} ::1 {supported_inet6}} |
