Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Commit

Permalink
Fixed async_pipe move assign
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Nov 1, 2016
1 parent ee01985 commit 06f3bb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/process/detail/windows/async_pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ async_pipe& async_pipe::operator=(const async_pipe & p)

async_pipe& async_pipe::operator=(async_pipe && rhs)
{
if (_source.native_handle() == ::boost::detail::winapi::INVALID_HANDLE_VALUE_)
if (_source.native_handle() != ::boost::detail::winapi::INVALID_HANDLE_VALUE_)
::boost::detail::winapi::CloseHandle(_source.native());

if (_sink.native_handle() == ::boost::detail::winapi::INVALID_HANDLE_VALUE_)
if (_sink.native_handle() != ::boost::detail::winapi::INVALID_HANDLE_VALUE_)
::boost::detail::winapi::CloseHandle(_sink.native());

_source.assign(rhs._source.native_handle());
Expand Down

0 comments on commit 06f3bb2

Please sign in to comment.