1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

Merge pull request #74 from falk-werner/investigate_crash_arm32v7

fix crash on arm32v7 / minsize
This commit is contained in:
Falk Werner 2020-06-08 20:45:41 +02:00 committed by GitHub
commit 50662ee5fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,9 +50,8 @@ class Provider::Private
public: public:
explicit Private(char const * url) explicit Private(char const * url)
: is_shutdown_requested(false) : is_shutdown_requested(false)
, connection_state(ConnectionState::connecting)
{ {
ConnectionState connection_state = ConnectionState::connecting;
config = wfp_client_config_create(); config = wfp_client_config_create();
wfp_client_config_set_certpath(config, "client-cert.pem"); wfp_client_config_set_certpath(config, "client-cert.pem");
wfp_client_config_set_keypath(config, "client-key.pem"); wfp_client_config_set_keypath(config, "client-key.pem");
@ -92,6 +91,12 @@ public:
RequestShutdown(); RequestShutdown();
thread.join(); thread.join();
wfp_client_disconnect(client);
while (ConnectionState::disconnected != connection_state)
{
wfp_client_service(client);
}
wfp_client_dispose(client); wfp_client_dispose(client);
wfp_static_filesystem_dispose(fs); wfp_static_filesystem_dispose(fs);
@ -117,17 +122,12 @@ private:
{ {
wfp_client_service(context->client); wfp_client_service(context->client);
} }
wfp_client_disconnect(context->client);
while (wfp_impl_client_is_connected(context->client))
{
wfp_client_service(context->client);
}
} }
std::mutex shutdown_lock; std::mutex shutdown_lock;
std::thread thread; std::thread thread;
bool is_shutdown_requested; bool is_shutdown_requested;
ConnectionState connection_state;
wfp_client_config * config; wfp_client_config * config;
wfp_static_filesystem * fs; wfp_static_filesystem * fs;