mirror of
https://github.com/typesense/typesense.git
synced 2025-05-18 04:32:38 +08:00
Fix catch up error on https.
This commit is contained in:
parent
55d28e6f31
commit
1ca39459eb
@ -58,8 +58,6 @@ private:
|
||||
|
||||
bool exit_loop = false;
|
||||
|
||||
bool ssl_enabled = false;
|
||||
|
||||
private:
|
||||
|
||||
std::string version;
|
||||
@ -173,8 +171,4 @@ public:
|
||||
static void on_deferred_process_request(h2o_timer_t *entry);
|
||||
|
||||
void defer_processing(http_req& req, http_res& res, size_t timeout_ms);
|
||||
|
||||
bool is_ssl_enabled() {
|
||||
return ssl_enabled;
|
||||
}
|
||||
};
|
||||
|
@ -112,7 +112,6 @@ int HttpServer::setup_ssl(const char *cert_file, const char *key_file) {
|
||||
}
|
||||
|
||||
h2o_ssl_register_alpn_protocols(accept_ctx->ssl_ctx, h2o_http2_alpn_protocols);
|
||||
ssl_enabled = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -357,11 +357,13 @@ int run_server(const Config & config, const std::string & version, void (*master
|
||||
server->on(HttpServer::STREAM_RESPONSE_MESSAGE, HttpServer::on_stream_response_message);
|
||||
server->on(HttpServer::REQUEST_PROCEED_MESSAGE, HttpServer::on_request_proceed_message);
|
||||
|
||||
bool ssl_enabled = (!config.get_ssl_cert().empty() && !config.get_ssl_cert_key().empty());
|
||||
|
||||
// first we start the peering service
|
||||
|
||||
ThreadPool thread_pool(32);
|
||||
ReplicationState replication_state(&store, &thread_pool, server->get_message_dispatcher(),
|
||||
server->is_ssl_enabled(), config.get_catch_up_threshold_percentage(),
|
||||
ssl_enabled, config.get_catch_up_threshold_percentage(),
|
||||
create_init_db_snapshot, quit_raft_service);
|
||||
|
||||
std::thread raft_thread([&replication_state, &config, &state_dir]() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user