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

Using 'wait' instead of 'inactivity'? #374

Open
guusdk opened this issue May 18, 2021 · 3 comments
Open

Using 'wait' instead of 'inactivity'? #374

guusdk opened this issue May 18, 2021 · 3 comments

Comments

@guusdk
Copy link
Contributor

guusdk commented May 18, 2021

As per conversation in Converse's support MUC: it seems that Strophe is using the 'wait' attribute value where it should be using the 'inactivity' value of a BOSH session.

From the XEP:

7.1 Session Creation Request
(...)

  • 'wait' -- This attribute specifies the longest time (in seconds) that the connection manager is allowed to wait before responding to any request during the session. This enables the client to limit the delay before it discovers any network failure, and to prevent its HTTP/TCP connection from expiring due to inactivity.

(...)
7.2 Session Creation Response
(...)

  • 'inactivity' -- This attribute specifies the longest allowable inactivity period (in seconds). This enables the client to ensure that the periods with no requests pending are never too long (see Polling Sessions and Inactivity).

(...)

I'm seeing the following behavior with Openfire where a session was established with these attributes in the response:
secure="true" requests="2" inactivity="30" polling="5" wait="59" hold="1" ack="3554851751" maxpause="300" ver="1.6"

Generally speaking, subsequent request seem to follow each-other immediately. Occasionally though, the response to a request isn't followed by an immediate new request (I don't know why). Instead, it takes, in this example, between 58 and 60 seconds for a new request to be made, as shown in this screenshot:

image
(note the green line in the red box being interrupted).

When the client eventually does create a new request, the server rejects it, as the inactivity period has passed.

It seems that the client is using the 'wait' period to generate a new request (why it didn't do so immediately might be a topic for a different issue). Instead, it probably should have used the 'inactivity' period.

@guusdk
Copy link
Contributor Author

guusdk commented May 18, 2021

const inactivity = bodyWrap.getAttribute('inactivity');

@jcbrand found this, where the 'inactivity' value does not seem to be used.

@Neustradamus

This comment was marked as spam.

@jcbrand
Copy link
Contributor

jcbrand commented Oct 16, 2023

@Neustradamus I was already pinged by @guusdk, there's no need for you to come afterwards and ping me again.

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

No branches or pull requests

3 participants