diff --git a/libretroshare/src/pqi/pqissl.cc b/libretroshare/src/pqi/pqissl.cc index 5809081f2..f329b5f01 100644 --- a/libretroshare/src/pqi/pqissl.cc +++ b/libretroshare/src/pqi/pqissl.cc @@ -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);