|
|
|
@ -441,7 +441,7 @@ absl::optional<CallInitiator> ChaoticGoodServerTransport::ExtractStream( |
|
|
|
|
|
|
|
|
|
absl::Status ChaoticGoodServerTransport::NewStream( |
|
|
|
|
uint32_t stream_id, CallInitiator call_initiator) { |
|
|
|
|
ReleasableMutexLock lock(&mu_); |
|
|
|
|
MutexLock lock(&mu_); |
|
|
|
|
auto it = stream_map_.find(stream_id); |
|
|
|
|
if (it != stream_map_.end()) { |
|
|
|
|
return absl::InternalError("Stream already exists"); |
|
|
|
@ -450,7 +450,6 @@ absl::Status ChaoticGoodServerTransport::NewStream( |
|
|
|
|
return absl::InternalError("Stream id is not increasing"); |
|
|
|
|
} |
|
|
|
|
stream_map_.emplace(stream_id, call_initiator); |
|
|
|
|
lock.Release(); |
|
|
|
|
call_initiator.OnDone([this, stream_id]() { |
|
|
|
|
MutexLock lock(&mu_); |
|
|
|
|
stream_map_.erase(stream_id); |
|
|
|
|