diff --git a/examples/spdycli.c b/examples/spdycli.c index d2815ae..e789aaa 100644 --- a/examples/spdycli.c +++ b/examples/spdycli.c @@ -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));