Closed Danielius1922 closed 3 months ago
@Sean-Der: The problematic scenario seems to go like this:
Goroutine A: Gets handshake mutex
Goroutine B: Waits on handshake mutex
Goroutine A: Handshake fails
close(c.decrypted)
Goroutine B: Gets handshake mutex
Handshake succeeds or fails
close(c.decrypted)
panic - closing of a closed channel
If the first handshake succeeds the issue does not occur.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.13%. Comparing base (
f3e8a9e
) to head (38b2704
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Handshake are synchronized by a mutex, but there is a panicing scenario when the first handshake fails.
Description
Reference issue
Fixes #...