New stream management option: ack_timeout#1287
Conversation
Close the connection if a stream management client fails to respond to an acknowledgement request within 60 seconds. This number of seconds can be changed with the new "ack_timeout" option, and the mechanism can be disabled by specifying 'infinity'. As a side effect of this change, a new acknowledgement is no longer requested before the response to the previous request is received.
| ?DEBUG("Timeout waiting for stream management acknowledgement of ~s", | ||
| [jid:to_string(StateData#state.jid)]), | ||
| close(self()), | ||
| fsm_next_state(StateName, StateData); |
There was a problem hiding this comment.
Shouldn't you set mgmt_ack_timer to undefined here, won't it be still set in case that session is resumed later?
There was a problem hiding this comment.
I don't think that's necessary, as the connection that resumes the session has a new fresh #state and mgmt_ack_timer is not inherited from the old state. But we could of course set mgmt_ack_timer = undefined to clarify the code.
There was a problem hiding this comment.
But we could of course set
mgmt_ack_timer = undefinedto clarify the code.
I was going to update the PR accordingly, but there's the minor downside that a new timer would be spawned if another stanza arrives before the process actually goes into the wait_for_resume state. This is avoided by not setting mgmt_ack_timer = undefined. We could set it to expired or something, though :-)
There was a problem hiding this comment.
That's fine, i just was not sure how new session is created from old one, if this will not affect it, then i am ok with it.
|
Looks ok to me, so let's merge it. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Close the connection if a stream management client fails to respond to an acknowledgement request within 60 seconds. This number of seconds can be changed with the new
ack_timeoutoption, and the mechanism can be disabled by specifyinginfinity.As a side effect of this change, a new acknowledgement is no longer requested before the response to the previous request is received.