Ticket #8933: win_iocp_io_service.ipp.patch

File win_iocp_io_service.ipp.patch, 1.3 KB (added by Shane Powell <killerbee@…>, 9 years ago)

Patch to fix the problem

  • win_iocp_io_service.ipp

     
    236236  op->ready_ = 1;
    237237
    238238  // Enqueue the operation on the I/O completion port.
    239   if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
     239  if (!::PostQueuedCompletionStatus(iocp_.handle, 0, overlapped_contains_result, op))
    240240  {
    241241    // Out of resources. Put on completed queue instead.
    242242    mutex::scoped_lock lock(dispatch_mutex_);
     
    256256    op->ready_ = 1;
    257257
    258258    // Enqueue the operation on the I/O completion port.
    259     if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
     259    if (!::PostQueuedCompletionStatus(iocp_.handle, 0, overlapped_contains_result, op))
    260260    {
    261261      // Out of resources. Put on completed queue instead.
    262262      mutex::scoped_lock lock(dispatch_mutex_);
     
    283283  if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
    284284  {
    285285    // Enqueue the operation on the I/O completion port.
    286     if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
     286    if (!::PostQueuedCompletionStatus(iocp_.handle, 0, overlapped_contains_result, op))
    287287    {
    288288      // Out of resources. Put on completed queue instead.
    289289      mutex::scoped_lock lock(dispatch_mutex_);