Retry writes in the TCP, mcast, and serial listener plugins while sending
a response to clients, if the write fails or is incomplete. Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
This commit is contained in:
parent
95a10ca43e
commit
647c144d82
@ -316,7 +316,7 @@ do_fence_request_tcp(fence_req_t *req, mcast_info *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dbg_printf(3, "Sending response to caller...\n");
|
dbg_printf(3, "Sending response to caller...\n");
|
||||||
if (write(fd, &response, 1) < 0) {
|
if (_write_retry(fd, &response, 1, NULL) < 0) {
|
||||||
perror("write");
|
perror("write");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,9 +239,8 @@ do_fence_request(int fd, const char *src, serial_req_t *req, serial_info *info)
|
|||||||
swab_serial_resp_t(&resp);
|
swab_serial_resp_t(&resp);
|
||||||
|
|
||||||
dbg_printf(3, "Sending response to caller...\n");
|
dbg_printf(3, "Sending response to caller...\n");
|
||||||
if (write(fd, &resp, sizeof(resp)) < 0) {
|
if (_write_retry(fd, &resp, sizeof(resp), NULL) < 0)
|
||||||
perror("write");
|
perror("write");
|
||||||
}
|
|
||||||
|
|
||||||
/* XVM shotguns multicast packets, so we want to avoid
|
/* XVM shotguns multicast packets, so we want to avoid
|
||||||
* acting on the same request multiple times if the first
|
* acting on the same request multiple times if the first
|
||||||
|
@ -239,7 +239,7 @@ do_fence_request_tcp(int fd, fence_req_t *req, tcp_info *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dbg_printf(3, "Sending response to caller...\n");
|
dbg_printf(3, "Sending response to caller...\n");
|
||||||
if (write(fd, &response, 1) < 0) {
|
if (_write_retry(fd, &response, 1, NULL) < 0) {
|
||||||
perror("write");
|
perror("write");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user