Always wait until complete frame has been transmitted
This commit is contained in:
parent
2f5476c3a5
commit
7c304b34a0
@ -212,6 +212,11 @@ mbus_serial_send_frame(mbus_serial_handle *handle, mbus_frame *frame)
|
||||
fprintf(stderr, "%s: Failed to write frame to socket (ret = %d: %s)\n", __PRETTY_FUNCTION__, ret, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
//
|
||||
// wait until complete frame has been transmitted
|
||||
//
|
||||
tcdrain(handle->fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user