(http client) fix deadlock when following redirects

This commit is contained in:
Benjamin Sergeant
2020-06-19 00:11:06 -07:00
parent 9bb3643fc7
commit 10c014bf98
4 changed files with 9 additions and 3 deletions

View File

@ -103,7 +103,9 @@ namespace ix
std::thread _thread;
std::unique_ptr<Socket> _socket;
std::mutex _mutex; // to protect accessing the _socket (only one socket per client)
std::recursive_mutex _mutex; // to protect accessing the _socket (only one socket per client)
// the mutex needs to be recursive as this function might
// be called recursively to follow HTTP redirections
SocketTLSOptions _tlsOptions;