Compare commits

..

2 commits

Author SHA1 Message Date
3bae770c93 [#326] pool: Add test for concurrent client deletion
All checks were successful
DCO / DCO (pull_request) Successful in 28s
Code generation / Generate proto (pull_request) Successful in 34s
Tests and linters / Tests (pull_request) Successful in 47s
Tests and linters / Lint (pull_request) Successful in 2m16s
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-01-29 20:15:03 +03:00
37350dbb1e [#326] pool: Fix panic that causes mutex deadlock
Two concurrent 'deleteClientFromMap' calls for
the same client may produce panic and deadlock.

First goroutine acquires lock, removes element
from the map, releases lock.

Second goroutine acquires lock, and throws panic
while trying to call 'close()' on empty struct.
Lock is never released and it causes deadlock for
other goroutines.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-01-29 20:14:55 +03:00

Diff content is not available