fixed OpenSSL connection problem due to multithread issue