put a safety check against sockfd==-1

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2322 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-02-14 16:43:42 +00:00
parent 1f6444829f
commit 17ef6b932b

View File

@ -747,6 +747,9 @@ int pqissl::Basic_Connection_Complete()
FD_ZERO(&WriteFDs);
FD_ZERO(&ExceptFDs);
if(sockfd < 0)
return -1 ;
FD_SET(sockfd, &ReadFDs);
FD_SET(sockfd, &WriteFDs);
FD_SET(sockfd, &ExceptFDs);