mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix #752: retry resource temporarily unavailable on control pipe.
git-svn-id: file:///svn/unbound/trunk@3746 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
8336eab1e1
commit
6b506545cd
2 changed files with 5 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
2 June 2016: Wouter
|
2 June 2016: Wouter
|
||||||
- Fix libubound for edns optlist feature.
|
- Fix libubound for edns optlist feature.
|
||||||
- Fix distinction between free and CRYPTO_free in dsa and ecdsa alloc.
|
- Fix distinction between free and CRYPTO_free in dsa and ecdsa alloc.
|
||||||
|
- Fix #752: retry resource temporarily unavailable on control pipe.
|
||||||
|
|
||||||
31 May 2016: Wouter
|
31 May 2016: Wouter
|
||||||
- Fix windows service to be created run with limited rights, as a
|
- Fix windows service to be created run with limited rights, as a
|
||||||
|
|
|
||||||
|
|
@ -304,6 +304,8 @@ int tube_write_msg(struct tube* tube, uint8_t* buf, uint32_t len,
|
||||||
d = r;
|
d = r;
|
||||||
while(d != (ssize_t)sizeof(len)) {
|
while(d != (ssize_t)sizeof(len)) {
|
||||||
if((r=write(fd, ((char*)&len)+d, sizeof(len)-d)) == -1) {
|
if((r=write(fd, ((char*)&len)+d, sizeof(len)-d)) == -1) {
|
||||||
|
if(errno == EAGAIN)
|
||||||
|
continue; /* temporarily unavail: try again*/
|
||||||
log_err("tube msg write failed: %s", strerror(errno));
|
log_err("tube msg write failed: %s", strerror(errno));
|
||||||
(void)fd_set_nonblock(fd);
|
(void)fd_set_nonblock(fd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -313,6 +315,8 @@ int tube_write_msg(struct tube* tube, uint8_t* buf, uint32_t len,
|
||||||
d = 0;
|
d = 0;
|
||||||
while(d != (ssize_t)len) {
|
while(d != (ssize_t)len) {
|
||||||
if((r=write(fd, buf+d, len-d)) == -1) {
|
if((r=write(fd, buf+d, len-d)) == -1) {
|
||||||
|
if(errno == EAGAIN)
|
||||||
|
continue; /* temporarily unavail: try again*/
|
||||||
log_err("tube msg write failed: %s", strerror(errno));
|
log_err("tube msg write failed: %s", strerror(errno));
|
||||||
(void)fd_set_nonblock(fd);
|
(void)fd_set_nonblock(fd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue