Moved WebConnectionGroup.Close() call out of the ServicePoint lock
authorHellBrick <hellbrick@webkontrol.ru>
Mon, 30 Mar 2015 09:45:27 +0000 (12:45 +0300)
committerHellBrick <hellbrick@webkontrol.ru>
Mon, 30 Mar 2015 09:45:27 +0000 (12:45 +0300)
commit7ee2810f4a34096e55693b574b6ba4a33e8cbd74
tree263352a2b82d48b1dc9cd1f0ad6d92c344b21522
parent893bacaf9a6f6544cb9a3e65799d7b5bcf7c163a
Moved WebConnectionGroup.Close() call out of the ServicePoint lock

WebConnectionGroup.Close() calls WebConnection.Close(), which takes connection lock and then takes the service point lock. Calling WebConnectionGroup.Close() leads to taking the service point lock *before* the connection lock, which leads to a deadlock.
mcs/class/System/System.Net/ServicePoint.cs