(http client) fix deadlock when following redirects
This commit is contained in:
@ -127,7 +127,7 @@ namespace ix
|
||||
{
|
||||
// We only have one socket connection, so we cannot
|
||||
// make multiple requests concurrently.
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
std::lock_guard<std::recursive_mutex> lock(_mutex);
|
||||
|
||||
uint64_t uploadSize = 0;
|
||||
uint64_t downloadSize = 0;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -6,4 +6,4 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define IX_WEBSOCKET_VERSION "9.7.8"
|
||||
#define IX_WEBSOCKET_VERSION "9.7.9"
|
||||
|
Reference in New Issue
Block a user