diff --git a/src/uh_ssl.c b/src/uh_ssl.c index e3d9051..01e5a15 100755 --- a/src/uh_ssl.c +++ b/src/uh_ssl.c @@ -32,7 +32,6 @@ int uh_ssl_init(struct uh_server *srv, const char *key, const char *crt) if (_init) return 0; - _init = true; dlh = dlopen("libustream-ssl.so", RTLD_LAZY | RTLD_LOCAL); if (!dlh) { uh_log_err("Failed to load ustream-ssl library: %s", dlerror()); @@ -57,6 +56,8 @@ int uh_ssl_init(struct uh_server *srv, const char *key, const char *crt) return -EINVAL; } + _init = true; + return 0; }