Commit 0df0b0ec authored by Scott Vokes's avatar Scott Vokes
Browse files

Set timeout once outgoing requests are going out on the network.

There is still a timeout on the pre-send phase, but the timeout is reset to
the original full timeout once the send completes. If the timeout fails
during the pre-send phase, that's indicative of a very different kind of
error, and should still be logged.
parent 99f2d808
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -614,6 +614,7 @@ static void enqueue_write(struct sender *s, tx_info_t *info) {
        struct u_write uw = {
            .fd = info->u.enqueue.fd,
            .timeout_sec = info->u.enqueue.timeout_sec,
            .orig_timeout_sec = info->u.enqueue.timeout_sec,
            .box = info->u.enqueue.box,
            .fdi = fdi,
        };
@@ -908,7 +909,7 @@ static void update_sent(struct bus *b, sender *s, tx_info_t *info, ssize_t sent)

        struct u_notify un = {
            .fd = info->u.write.fd,
            .timeout_sec = info->u.write.timeout_sec,
            .timeout_sec = info->u.write.orig_timeout_sec,
            .box = info->u.write.box,
        };

+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ typedef struct {
        struct u_write {
            int fd;
            time_t timeout_sec;
            time_t orig_timeout_sec;
            boxed_msg *box;
            size_t sent_size;
            fd_info *fdi;