Skip to content

Commit 9fb70ea

Browse files
Fix the stream is not closed issue (#1432)
In case of error we must close the stream. Relates-To: OAM-2174 Signed-off-by: Mykhailo Kuchma <[email protected]>
1 parent 3146857 commit 9fb70ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

olp-cpp-sdk-dataservice-read/src/VersionedLayerClientImpl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ client::CancellationToken VersionedLayerClientImpl::StreamLayerPartitions(
124124
auto version_response =
125125
GetVersion(boost::none, FetchOptions::OnlineIfNotFound, context);
126126
if (!version_response.IsSuccessful()) {
127+
async_stream->CloseStream(version_response.GetError());
127128
return version_response.GetError();
128129
}
129130

0 commit comments

Comments
 (0)