You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix 2 problems in client_tcert_pool_mt.go, including one causing deadlock.
Fixed 2 obvious problems in client_tcert_pool_mt.go.
- Function (*tCertPoolEntry).GetNextTCert() should be thread-safe,
so that it doesn't make sense to put tCertBlock to shared object field.
- Function (*tCertPoolMultithreadingImpl).Start() shouldn't call poolEntry.Start(),
as it was already called inside tCertPool.getPoolEntry(attributes).
The latter problem was causing deadlock (due to insufficient channel size).
To reproduce, run go test -run=TestClientGetNextTCerts at crypto directory,
using a version of crypto_test.go in this commit
(reverting #1809).
This commit also includes a fix of TestClientGetAttributesFromTCertWithUnusedTCerts,
(using fresh client, not reusing the old one).
Change-Id: I1b4bd0dd111ebaf182a87dc5f3ecd3e4c0278a0f
Signed-off-by: Akihiko Tozawa <[email protected]>
//Returns a tCertPoolEntry for the attributes "attributes", if the tCertPoolEntry doesn't exists a new tCertPoolEntry will be create for that attributes.
0 commit comments