From 81702ae77953d7532801c7529d18f4eb02b3b459 Mon Sep 17 00:00:00 2001 From: darkeye Date: Tue, 18 Sep 2001 16:44:10 +0000 Subject: [PATCH] TcpSocket did not report closed state when could not connect() --- darkice/trunk/src/TcpSocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/darkice/trunk/src/TcpSocket.cpp b/darkice/trunk/src/TcpSocket.cpp index ec6c674..dcd4039 100644 --- a/darkice/trunk/src/TcpSocket.cpp +++ b/darkice/trunk/src/TcpSocket.cpp @@ -208,6 +208,7 @@ TcpSocket :: open ( void ) throw ( Exception ) if ( connect( sockfd, (struct sockaddr*)&addr, sizeof(addr)) == -1 ) { ::close( sockfd); + sockfd = 0; throw Exception( __FILE__, __LINE__, "connect error", errno); } @@ -348,6 +349,9 @@ TcpSocket :: close ( void ) throw ( Exception ) $Source$ $Log$ + Revision 1.6 2001/09/18 16:44:10 darkeye + TcpSocket did not report closed state when could not connect() + Revision 1.5 2001/08/30 17:25:56 darkeye renamed configure.h to config.h