Ignore:
Timestamp:
11/16/11 21:55:19 (13 years ago)
Author:
tbretz
Message:
Fixed a bug which could cause crahses when a transmission is interrupted at the moment the connection is opened and e.g. the bias crate is not yet switched on.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/ConnectionUSB.cc

    r12236 r12540  
    205205    // functions directly from any other place then Handlers, use
    206206    // PostMessage instead
    207     fOutQueue.pop_front();
     207    if (!fOutQueue.empty())
     208        fOutQueue.pop_front();
    208209
    209210    if (fOutQueue.empty())
     
    214215    }
    215216
    216     // AsyncWrite + Deadline
     217     // AsyncWrite + Deadline
    217218    AsyncWrite(ba::const_buffers_1(fOutQueue.front().data(), fOutQueue.front().size())/*, &ConnectionUSB::HandleSentData*/);
    218219    AsyncWait(fOutTimeout, 5000, &ConnectionUSB::HandleWriteTimeout);
Note: See TracChangeset for help on using the changeset viewer.