Closed kraih closed 7 years ago
Thanks for reporting the problem which was a very interesting one. It was actually not really caused by the change you refer to but this change just awoke a long existing problem which got then triggered by your test:
The specific test mojo/tls.t calls socketpair($client_sock,$server_sock)
where $client_sock
is an existing IO::Socket::SSL object from a previous subtest. socketpair
will just reopen the underlying file descriptor and keep everything else, i.e. it will not destroy the object. This way _SSL_opened
on this object is still set to 1 because the previous connect_SSL
succeeded and because of commit f1b51fd it will not try again to connect_SSL
, causing the test to hang.
The issue is fixed in 2.046 with commit 7ee0ba3 by explicitly initializing the internal of the object in configure_SSL
instead of assuming that there should be no internals yet.
Thanks, interesting problem.
Perhaps it would be good to have a test case in IO::Socket::SSL for this?
@Grinnz : Of course it would definitely be useful to have more tests for IO::Socket::SSL. I'm usually open to outside help so please feel free to provide such test.
A few days ago you've applied this change https://github.com/noxxi/p5-io-socket-ssl/commit/f1b51fda12080b4cda91cf44cb3040de574f9f51, which unfortunately results in Mojolicious tests hanging forever. I don't know yet what exactly the problem is, but wanted to bring it to your attention as fast as possible (before the inevitable wave of bug reports from our users starts). https://travis-ci.org/kraih/mojo/builds/201950894