nghttpx: Now ocsp works without threads

This commit is contained in:
Tatsuhiro Tsujikawa 2015-04-09 00:59:43 +09:00
parent bc53c81616
commit b873930802
2 changed files with 1 additions and 9 deletions

View File

@ -2015,12 +2015,6 @@ int main(int argc, char **argv) {
}
if (!get_config()->upstream_no_tls && !get_config()->no_ocsp) {
#ifdef NOTHREADS
mod_config()->no_ocsp = true;
LOG(WARN)
<< "OCSP stapling has been disabled since it requires threading but"
"threading disabled at build time.";
#else // !NOTHREADS
struct stat buf;
if (stat(get_config()->fetch_ocsp_response_file.get(), &buf) != 0) {
mod_config()->no_ocsp = true;
@ -2028,7 +2022,6 @@ int main(int argc, char **argv) {
<< get_config()->fetch_ocsp_response_file.get()
<< " not found. OCSP stapling has been disabled.";
}
#endif // !NOTHREADS
}
if (get_config()->downstream_addrs.empty()) {

View File

@ -355,7 +355,6 @@ void ConnectionHandler::cancel_ocsp_update() {
// inspired by h2o_read_command function from h2o project:
// https://github.com/h2o/h2o
int ConnectionHandler::start_ocsp_update(const char *cert_file) {
#ifndef NOTHREADS
int rv;
int pfd[2];
@ -426,7 +425,7 @@ int ConnectionHandler::start_ocsp_update(const char *cert_file) {
ev_child_set(&ocsp_.chldev, ocsp_.pid, 0);
ev_child_start(loop_, &ocsp_.chldev);
#endif // !NOTHREADS
return 0;
}