* reintroduced the locking in the http destructor (the worker thread might still be running otherwise)