projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add timeouts to 'tinc join'
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
2ed286a
..
3b7efd4
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-495,6
+495,10
@@
bool recvline(int fd, char *line, size_t len) {
}
while(!(newline = memchr(buffer, '\n', blen))) {
+ if(!wait_socket_recv(fd)) {
+ return false;
+ }
+
ssize_t nrecv = recv(fd, buffer + blen, sizeof(buffer) - blen, 0);
if(nrecv == -1 && sockerrno == EINTR) {