Changeset 1742

Show
Ignore:
Timestamp:
26/07/2007 22:36:12 (18 months ago)
Author:
chris
Message:

Log reasons for failure to connect to a socket. (refs #3, merges [1708])

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • box/chris/general/lib/server/SocketStream.cpp

    r590 r1742  
    1616#include <sys/types.h> 
    1717#include <errno.h> 
     18#include <string.h> 
    1819 
    1920#ifndef WIN32 
     
    165166                ::close(mSocketHandle); 
    166167#endif 
     168                BOX_ERROR("Failed to connect to socket (type " << Type << 
     169                        ", name " << Name << ", port " << Port << "): " << 
     170                        "error " << errno << " (" << strerror(errno) <<  
     171                        ")"); 
    167172                mSocketHandle = INVALID_SOCKET_VALUE; 
    168173                THROW_EXCEPTION(ConnectionException, Conn_SocketConnectError)