Repository navigation
Revert "Use a separate gorutine to handle the logic of reconnect" - #700
Conversation
This reverts commit 39e13ac.
Signed-off-by: xiaolongran <[email protected]>
|
Just to be clear, this commit doesn't actually revert #691 but instead adds a close channel, right? If so it might be good to update the title. I do have a separate concern with this approach, which might or might not be justified. It looks to me like operations which were previously serialized by virtue of the single goroutine in For example: suppose the user calls Does it not matter that Also, does it matter that (because of goroutine scheduling) the order in which these operations execute can now be different to before? Would really appreciate your thoughts @wolfstudy / @cckellogg. Apologies in advance if you already considered this possibility and there is no issue. |
|
If the operations occurring simultaneously could be an issue then it would be easy to add a lock to prevent this. However I don't think that would prevent the order of operations from being changed from the previous behaviour? |
Signed-off-by: xiaolongran <[email protected]> ### Motivation In #700, we use a separate go rutine to handle the logic of reconnect, so here you may encounter the same data race problem as #535 ### Modifications Now, the conn field is read and written atomically; avoiding race conditions.
Reverts #691