add a control when establishing a ssl connection and the sockfd is -1

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2331 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-02-15 15:31:37 +00:00
parent 5d128e77e9
commit 72a3396a58

View File

@ -739,7 +739,16 @@ int pqissl::Basic_Connection_Complete()
"pqissl::Basic_Connection_Complete() Wrong Mode"); "pqissl::Basic_Connection_Complete() Wrong Mode");
return -1; return -1;
} }
// use select on the opened socket.
if (sockfd == -1)
{
rslog(RSL_DEBUG_BASIC, pqisslzone,
"pqissl::Basic_Connection_Complete() problem with the socket descriptor. Aborting");
reset();
return -1;
}
// use select on the opened socket.
// Interestingly - This code might be portable.... // Interestingly - This code might be portable....
fd_set ReadFDs, WriteFDs, ExceptFDs; fd_set ReadFDs, WriteFDs, ExceptFDs;