修复了q/exit无法退出的问题

This commit is contained in:
sakitsuki_asahi
2025-08-02 01:47:13 +09:00
parent f1938cfbe8
commit 900d4fba30
2 changed files with 6 additions and 1 deletions
BIN
View File
Binary file not shown.
+6 -1
View File
@@ -205,7 +205,12 @@ int main(int argn,char* argc[]){
std::cout.write(buffer,size); std::cout.write(buffer,size);
} }
if(strcmp(cmd,"exit")==0||strcmp(cmd,"q")==0){ 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); close(sockfd);