Skip to content

Commit

Permalink
srw: added comment why to close request stream
Browse files Browse the repository at this point in the history
  • Loading branch information
YandexBuildBot committed Oct 22, 2015
1 parent 21b11d4 commit 470942d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions srw/srw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,9 @@ class srw {
}

stream->write((const char *)sph, total_size(sph) + sizeof(struct sph));
/*
* Request stream should be closed after all data was sent to prevent resource leackage.
*/
stream->close();

} catch (const std::exception &e) {
Expand Down

0 comments on commit 470942d

Please sign in to comment.