Closed Wessie closed 5 months ago
nailed it
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
f477179
) 55.99% compared to head (819351e
) 56.25%. Report is 3 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Logic race condition, if the decode goroutine can run before the caller can, the channel returned might not have a receiver yet and then the select/default construct will drop the event and close the channel.
The caller then ends up with a zero-value
decodedEvent
wheredecodedEvent.err
anddecodedEvent.event
are both nil which passes the err check at line 434 and might enter line 440 wheredecodedEvent.event
is then used as-is with no additional check for it being nil.Fixed this scenario by giving the returned channel a buffer slot so that
decode
can always send its event.