Skip to content
Snippets Groups Projects
Commit 90ac15e7 authored by benbergk's avatar benbergk
Browse files

fixed bug (multiple initialization of ssl library)

parent 18c2de5a
Branches crawler2.0
No related tags found
No related merge requests found
......@@ -29,9 +29,6 @@ void HttpsReader::request()
// Build an SSL layer and set it to read/write
// to the socket we've connected.
SSL_library_init( );
ctx = SSL_CTX_new( SSLv23_method( ) );
assert( ctx );
ssl = SSL_new( ctx );
......
......@@ -10,6 +10,7 @@
#include <pthread.h>
#include <queue>
#include "crawler/crawler.h"
#include <openssl/ssl.h>
#include <string>
//#include "crawler/CrawlerStatistics.h"
#include <unordered_map>
......@@ -49,7 +50,7 @@ int main( int argc, char *argv[] )
string mode = "web";
int numberOfSpiders = 1;
int numberOfSpiders = 3;
opterr = true;
int choice;
......@@ -94,8 +95,11 @@ int main( int argc, char *argv[] )
char *seeds;
if (mode == "local")
seeds = util::getFileMap("/tests/localSeed.txt");
else
else {
seeds = util::getFileMap("/tests/webSeed.txt");
SSL_library_init( );
}
string testFile;
while (*seeds) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment