diff options
Diffstat (limited to 'src/libstddjb/socket_deadlineconnstamp4.c')
-rw-r--r-- | src/libstddjb/socket_deadlineconnstamp4.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstddjb/socket_deadlineconnstamp4.c b/src/libstddjb/socket_deadlineconnstamp4.c index 1bb4e34..5691932 100644 --- a/src/libstddjb/socket_deadlineconnstamp4.c +++ b/src/libstddjb/socket_deadlineconnstamp4.c @@ -6,7 +6,9 @@ int socket_deadlineconnstamp (int s, char const *ip, uint16_t port, tain_t const *deadline, tain_t *stamp) { + int e = errno ; if (socket_connect4(s, ip, port) >= 0) return 1 ; if (!error_isagain(errno) && !error_isalready(errno)) return 0 ; + errno = e ; return socket_waitconn(s, deadline, stamp) ; } |