mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
1f6444829f
commit
17ef6b932b
@ -747,6 +747,9 @@ int pqissl::Basic_Connection_Complete()
|
|||||||
FD_ZERO(&WriteFDs);
|
FD_ZERO(&WriteFDs);
|
||||||
FD_ZERO(&ExceptFDs);
|
FD_ZERO(&ExceptFDs);
|
||||||
|
|
||||||
|
if(sockfd < 0)
|
||||||
|
return -1 ;
|
||||||
|
|
||||||
FD_SET(sockfd, &ReadFDs);
|
FD_SET(sockfd, &ReadFDs);
|
||||||
FD_SET(sockfd, &WriteFDs);
|
FD_SET(sockfd, &WriteFDs);
|
||||||
FD_SET(sockfd, &ExceptFDs);
|
FD_SET(sockfd, &ExceptFDs);
|
||||||
|
Loading…
Reference in New Issue
Block a user