diff --git a/RSA-Chat b/RSA-Chat index 39df587..41b655d 100755 Binary files a/RSA-Chat and b/RSA-Chat differ diff --git a/src/cpp/RSA-Chat.cpp b/src/cpp/RSA-Chat.cpp index 73de560..74a81df 100644 --- a/src/cpp/RSA-Chat.cpp +++ b/src/cpp/RSA-Chat.cpp @@ -205,7 +205,12 @@ int main(int argn,char* argc[]){ std::cout.write(buffer,size); } if(strcmp(cmd,"exit")==0||strcmp(cmd,"q")==0){ - break; + close(sockfd); + EVP_PKEY_free(local_key); + EVP_PKEY_free(peer_key); + stop_flag = true; + t.join(); + return 0; } } close(sockfd);