Do not spam errors!
This commit is contained in:
parent
385301f5cf
commit
29f67daddd
1 changed files with 7 additions and 5 deletions
|
|
@ -316,6 +316,7 @@ void *dev_out_thread_func(void *ptr) {
|
|||
} else if (dev_out->communication.type == ipc_server_sockets) {
|
||||
if (pthread_mutex_lock(&dev_out->communication.endpoint.ssocket.mutex) == 0) {
|
||||
for (int i = 0; i < MAX_CONNECTED_CLIENTS; ++i) {
|
||||
if (dev_out->communication.endpoint.ssocket.clients[i] > 0) {
|
||||
const int write_res = write(dev_out->communication.endpoint.ssocket.clients[i], (void*)&out_msgs, bytes_to_send);
|
||||
if (write_res != bytes_to_send) {
|
||||
fprintf(stderr, "Error in writing out_message to socket number %d: %d\n", i, write_res);
|
||||
|
|
@ -323,6 +324,7 @@ void *dev_out_thread_func(void *ptr) {
|
|||
dev_out->communication.endpoint.ssocket.clients[i] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&dev_out->communication.endpoint.ssocket.mutex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue