mirror of
https://github.com/eddyem/eddys_snippets.git
synced 2026-03-22 01:31:16 +03:00
remove bug with sockets: write->send(..., MSG_NOSIGNAL)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user