diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-12-02 14:27:00 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-12-05 23:21:02 +0100 |
commit | 07cb27c98e92649e74a312faf976271fa7da609c (patch) | |
tree | 174c9985ca7e8623401117608e52b46afe2914c2 /lib/urldata.h | |
parent | 85f0133ea14f411b4dae9c6239c83a67ca7bca89 (diff) | |
download | curl-07cb27c98e92649e74a312faf976271fa7da609c.tar.gz |
conncache: fix several lock issues
If the lock is released before the dealings with the bundle is over, it may
have changed by another thread in the mean time.
Fixes #2132
Fixes #2151
Closes #2139
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index ed6bbb4f0..19cb6cafd 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -775,9 +775,10 @@ struct connectdata { void *closesocket_client; bool inuse; /* This is a marker for the connection cache logic. If this is - TRUE this handle is being used by an easy handle and cannot - be used by any other easy handle without careful - consideration (== only for pipelining). */ + TRUE this handle is being used by one or more easy handles + and can only used by any other easy handle without careful + consideration (== only for pipelining/multiplexing) and it + cannot be used by another multi handle! */ /**** Fields set when inited and not modified again */ long connection_id; /* Contains a unique number to make it easier to @@ -1325,6 +1326,9 @@ struct UrlState { struct Curl_easy *stream_depends_on; bool stream_depends_e; /* set or don't set the Exclusive bit */ int stream_weight; +#ifdef CURLDEBUG + bool conncache_lock; +#endif }; |