diff options
author | melkov <melkov@yandex-team.com> | 2024-11-07 17:54:31 +0300 |
---|---|---|
committer | melkov <melkov@yandex-team.com> | 2024-11-07 18:07:12 +0300 |
commit | beb215da45686043f15eaae402307dd39c2a16e9 (patch) | |
tree | bb9d8c90cfe547b221c2442cb4c27c8236db4693 | |
parent | 1aa156b489634d335022cc22d625287075129886 (diff) | |
download | ydb-beb215da45686043f15eaae402307dd39c2a16e9.tar.gz |
YT-23048: Fix data race in tls between the end of read/write and calls to IsIdle
commit_hash:f0665a78b31b5c729b9cd09cfe30b33593e755a0
-rw-r--r-- | yt/yt/core/crypto/tls.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yt/yt/core/crypto/tls.cpp b/yt/yt/core/crypto/tls.cpp index 0eb910fbab..b01be094ca 100644 --- a/yt/yt/core/crypto/tls.cpp +++ b/yt/yt/core/crypto/tls.cpp @@ -539,19 +539,19 @@ private: WriteActive_ = false; WriteBuffer_.Reset(); + --ActiveIOCount_; WritePromise_.Set(); WritePromise_.Reset(); - --ActiveIOCount_; } if (ReadActive_) { int count = SSL_read(Ssl_, ReadBuffer_.Begin(), ReadBuffer_.Size()); if (count >= 0) { ReadActive_ = false; - ReadPromise_.Set(count); - ReadPromise_.Reset(); ReadBuffer_.Reset(); --ActiveIOCount_; + ReadPromise_.Set(count); + ReadPromise_.Reset(); } else { int sslError = SSL_get_error(Ssl_, count); if (sslError == SSL_ERROR_WANT_READ) { |