diff --git a/.envrc b/.envrc deleted file mode 100644 index 1d953f4..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use nix diff --git a/lib/anthracite.cpp b/lib/anthracite.cpp index f1cf31c..d10cacb 100644 --- a/lib/anthracite.cpp +++ b/lib/anthracite.cpp @@ -89,13 +89,12 @@ int listen_loop(int port_number, backends::backend& be, bool tls) { socket::anthracite_socket* client_sock; if (tls){ - socket::openssl_socket* ssl_sock = dynamic_cast(socket); - client_sock = new socket::openssl_socket(*ssl_sock); + client_sock = new socket::openssl_socket(*dynamic_cast(socket)); } else { client_sock = new socket::anthracite_socket(*socket); } - std::thread(handle_client, client_sock, std::ref(be), std::ref(fb), std::ref(thread_wait_mutex), std::ref(thread_wait_condvar), std::ref(active_threads)).detach(); + std::thread(handle_client, socket, std::ref(be), std::ref(fb), std::ref(thread_wait_mutex), std::ref(thread_wait_condvar), std::ref(active_threads)).detach(); } delete socket; diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 201b9ef..0000000 --- a/shell.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs ? import {} }: - pkgs.mkShell { - nativeBuildInputs = [ pkgs.pkg-config pkgs.openssl pkgs.libgcc pkgs.boost pkgs.cmake ]; - - shellHook = '' - export OPENSSL_DIR="${pkgs.openssl.dev}" - export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig" - export OPENSSL_NO_VENDOR=1 - export OPENSSL_LIB_DIR="${pkgs.lib.getLib pkgs.openssl}/lib" - ''; -} diff --git a/src/api_main.cpp b/src/api_main.cpp index e7b5366..4a42858 100644 --- a/src/api_main.cpp +++ b/src/api_main.cpp @@ -7,7 +7,6 @@ #include #include #include -#include using namespace anthracite;