remove bug with sockets: write->send(..., MSG_NOSIGNAL)

This commit is contained in:
2022-03-24 12:16:41 +03:00
parent 76a1ec0e81
commit 9a06693673
6 changed files with 9 additions and 9 deletions

View File

@@ -95,7 +95,7 @@ char* stringscan(char *str, char *needle){
* @return 0 if failed
*/
int send_data(uint8_t *data, size_t dlen, int sockfd){
size_t sent = write(sockfd, data, dlen);
size_t sent = send(sockfd, data, dlen, MSG_NOSIGNAL);
if(sent != dlen){
WARN("write()");
return 0;