Skip to content

Conversation

@shaitan
Copy link

@shaitan shaitan commented May 21, 2018

The race leads to crash when streams try to concurrently perform asynchronous operation on closed socket.

@shaitan shaitan added the bug Something isn't working label May 21, 2018
@shaitan shaitan requested a review from karitra May 21, 2018 08:33
Copy link

@karitra karitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


decoder_type m_decoder;

synchronized<bool> m_stopped{false};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be generic std::atomic<bool> more convenient? The same for writable_stream.

Copy link
Author

@shaitan shaitan May 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::atomic doesn't have RAII scope lock that is used in new code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants