I think you want to check dwNumBytes first then move this if inside that.
    
    if (dwNumBytes > 0)
    {
         if (lpOverlapped == NULL)
         {
               continue;
         }
      ....
    }

Otherwise, I think your call to `PostQueuedCompletionStatus` to signal the thread to terminate will get trapped because you pass `NULL` to it.  

In fact, I see 2 node instances still hanging around after quitting brackets.