title: std::getline fails after SSL function calls
body: <p>My <code>getline</code> read loop has stopped reading input after calls to some SSL functions.  Previously I had:</p>
  
  <pre><code>std::string input;
  ...
  
  while (std::getline(std::cin, line)) {
    ...
  }
  </code></pre>
  
  <p>This worked fine.  But after I wrapped the socket with SSL, input from the console is no longer being read.</p>
  
  <pre><code>SSL* ssl_fd = SSL_new(ctx);
  if (NULL == ssl_fd) {
    close(new_fd);
    continue;
  }
  
  if (0 == SSL_set_fd(ssl_fd, new_fd)) {
    close(new_fd);
    continue;
  }
  
  if (1 != SSL_accept(ssl_fd)) {
    ERR_print_errors_fp(stderr);
    close(new_fd);
    continue;
  }
  
  while (std::getline(std::cin, line)) {
    ...
  }
  </code></pre>
  
  <p>I've tried adding some calls to clear any buffer issues (<code>std::cout &lt;&lt; std::flush</code>, <code>std::cin.ignore()</code>, <code>std::cin.clear()</code>), but at this point I'm out of ideas.  It's really weird; if I take out the SSL calls, then the read loop runs fine and processes the input correctly.  As far as I can tell, the SSL calls don't have any impact on stdin or stdout.  </p>
  
  <p>Any recommendations or alternate approaches I could try?</p>