spdycli: Handle error return from connect_to()

This commit is contained in:
Tatsuhiro Tsujikawa 2013-01-25 22:44:51 +09:00
parent ac01e48f7a
commit 50bff9e647
1 changed files with 3 additions and 0 deletions

View File

@ -591,6 +591,9 @@ static void fetch_uri(const struct URI *uri)
/* Establish connection and setup SSL */
fd = connect_to(req.host, req.port);
if(fd == -1) {
die("Could not open file descriptor");
}
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
if(ssl_ctx == NULL) {
dief("SSL_CTX_new", ERR_error_string(ERR_get_error(), NULL));