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

This commit is contained in:
2022-03-24 12:21:49 +03:00
parent a7f4837530
commit fd5d3ddf8e
3 changed files with 1 additions and 96 deletions

View File

@@ -214,7 +214,7 @@ int SendData(chardevice *d, char *str){
break;
case DEV_NETSOCKET:
case DEV_UNIXSOCKET:
if(lplus != send(d->dev->comfd, buf, lplus, 0)) ret = 0;
if(lplus != send(d->dev->comfd, buf, lplus, MSG_NOSIGNAL)) ret = 0;
else ret = l;
pthread_mutex_unlock(&d->mutex);
break;