Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the invalid AMQP_STATUS_HEARTBEAT_TIMEOUT #557

Closed
wants to merge 2 commits into from

Conversation

hyuuhit
Copy link

@hyuuhit hyuuhit commented May 5, 2019

/* example */
struct timeval      tv = {
    .tv_sec = 0,
    .tv_usec = 0,
};

ret = amqp_consume_message(conn, &envelope, &tv, 0);

ret.reply_type never show AMQP_STATUS_HEARTBEAT_TIMEOUT, because amqp_time_immediate() not equal state->next_recv_heartbeat in wait_frame_inner


This change is Reviewable

@hyuuhit
Copy link
Author

hyuuhit commented May 5, 2019

hi, travis-ci failed when downloading libssl and openssl

alanxz added a commit that referenced this pull request Jun 22, 2020
Change behavior of amqp_time_from_now to set to the current timestamp
when a struct timeval of {0, 0} is passed in instead of 0. This better
aligns with how one would expect the function to work.

As a byproduct this corrects an issue where amqp_consume_message would
not return AMQP_STATUS_HEARTBEAT_TIMEOUT when a tv of {0, 0} and the
heartbeat interval had passed.

Fixes #557 in a more concise way.
@alanxz
Copy link
Owner

alanxz commented Jun 22, 2020

This does appear to be a bug, but isn't the most concise way to resolve it.

This is being resolved in #614

@alanxz alanxz closed this in #614 Jun 22, 2020
alanxz added a commit that referenced this pull request Jun 22, 2020
Change behavior of amqp_time_from_now to set to the current timestamp
when a struct timeval of {0, 0} is passed in instead of 0. This better
aligns with how one would expect the function to work.

As a byproduct this corrects an issue where amqp_consume_message would
not return AMQP_STATUS_HEARTBEAT_TIMEOUT when a tv of {0, 0} and the
heartbeat interval had passed.

Fixes #557 in a more concise way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants