summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'librabbitmq/amqp_socket.c')
-rw-r--r--librabbitmq/amqp_socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c
index 5f2878d..fdff1d2 100644
--- a/librabbitmq/amqp_socket.c
+++ b/librabbitmq/amqp_socket.c
@@ -760,7 +760,10 @@ int amqp_try_recv(amqp_connection_state_t state) {
state->last_queued_frame = link;
}
}
- timeout = amqp_time_immediate();
+ int res = amqp_time_s_from_now(&timeout, 0);
+ if (AMQP_STATUS_OK != res) {
+ return res;
+ }
return recv_with_timeout(state, timeout);
}