Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I don't think the code you show is enough to explain the problem. SSL wants to read first happens if non-blocking sockets are used or if you specify a timeout for the connection. The last case should be handled transparently for the user but in the first case you have to deal with want read first (SSL_WANT_READ) and want write first (SSL_WANT_WRITE) explicitly by waiting for the socket to be readable or writable using select or similar and then re-doing the failed action (read, write, connect_SSL, accept_SSL...) again. There is a part in the documentation of IO::Socket::SSL which deals with non-blocking sockets and describes how the handling differs from non-SSL sockets and what SSL_WANT_READ and SSL_WANT_WRITE mean.

As for the error about Interrupted system call: I think the origin of this must be somewhere in the code you did not show. The strace you show indicates that there happens a SIGCHLD, so an exit of a sub-process might be the cause of this problem. As with SSL_WANT_* you need to continue with the current operation if EINTR happens but this is expected when dealing with non-SSL sockets too.


In reply to Re: IO::Socket::SSL sometimes says 'SSL wants a read first' by noxxi
in thread IO::Socket::SSL sometimes says 'SSL wants a read first' by FloydATC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-29 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found