fix for datasocket and clientsocket, to be reviewed.

clientsocket: to print origin of error (rx/det) for tcp socket failure
datasocket: usleep only for send for rhel7, not for fedora.. when fpath /, fwrite 1, rx_start fails without sending exception
This commit is contained in:
2020-07-14 13:04:24 +02:00
parent 293fda0c7a
commit c67b7aab4d
3 changed files with 20 additions and 18 deletions

View File

@ -68,6 +68,8 @@ int DataSocket::Send(const void *buffer, size_t size) {
int data_size = static_cast<int>(size); // signed size
while (bytes_sent < (data_size)) {
auto this_send = ::write(getSocketId(), buffer, size);
usleep(0); // TODO: fix for rhel7 (not fedora) sending 0 chars for mess
// (rx_start with fwrite 1 and fpath /)
if (this_send <= 0)
break;
bytes_sent += this_send;