updates the ReadStream to have locking around channel writes and drain channels prior to closing them. if a channel has something in it that has not been read when it is closed, it will panic. the locking is to prevent a race condition where close is called, but the goroutine is still attempting to write to a channel.
renames closing to closed, so it makes a bit more sense when accessing it (e.g. if stream.closed)
Its not clear whether the root cause behind the linked issue was related to either or both of these fixes, as there isn't enough visibility in the logs/panic output to determine for sure, but either way, these seem like updates we will want.
This PR:
close
is called, but the goroutine is still attempting to write to a channel.closing
toclosed
, so it makes a bit more sense when accessing it (e.g.if stream.closed
)Its not clear whether the root cause behind the linked issue was related to either or both of these fixes, as there isn't enough visibility in the logs/panic output to determine for sure, but either way, these seem like updates we will want.
VIO-1237