Changeset 20876

Show
Ignore:
Timestamp:
10/10/07 13:43:10 (1 year ago)
Author:
patrick
Message:

Ensure that the socket is open before trying to close it when handling
errors.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/modules/gadgeteer/gadget/Acceptor.cpp

    r19729 r20876  
    323323         catch (vpr::IOException&) 
    324324         { 
    325             // Should never happen since timeout is infinite 
    326             client_sock->close(); 
     325            if ( client_sock->isOpen() ) 
     326            { 
     327               client_sock->close(); 
     328            } 
     329 
    327330            delete client_sock; 
    328331            client_sock = new vpr::SocketStream;