Can any one help from which file XMPP terminate request is being called on PAGE RELOAD?

< body rid=“909172200” sid=“41671ac6-0524-4c5c-b6ae-be29accf36ca” type=“terminate” xmlns=“” >< presence type=“unavailable” xmlns=“jabber:client” / >
</ body >

this above Http bind request is called on-page Reload from where this is being called?

Can you further explain?
You want the bosh terminate request?
This is coming from strophe on closing the connection.
The final close of connection on closing the tab or reloading is done in lib-jitsi-meet, search for sendBeacon.

1 Like

@damencho the is request

< body rid=“2484458211” sid=“e1f9b469-6927-49cd-a6d2-5c405f0376c0” type=“terminate” xmlns=“”><presence type=“unavailable” xmlns=“jabber:client”/ >

I checked XmppConnection.js that function is available (sendBeacon)
I added a breakpoint for that function, it’s not stoping there. before that only the request is being sent.

I want to stop sending this request (Terminate Request) to server if single participant is there in conference … on page RELOAD
and I am okay with Ghost participant…any way after 60 seconds it’s automatically removed (BOSH Time out)

Why? What is the point? On the new page load a new connection will be established with a new jid to the participant, there is no point in lingering around the old connection and session, nothing from that will be used after the reload …

I’m not sure that you can debug a beacon … as it is executed after the unload event of the page …

1 Like

The issue which we are facing is.

We have our own meeting Management system. We will create a meeting with those APIs only to enter in conference page and store details in the Database.

if a user joins a meeting with that API we will create room for that and store that entry in DB like an ongoing Meeting.

if there are at least 2 participants in the conference and if one user refreshes the conference page.
still meeting is active this time no issue. even if he sends Terminate-Request beacuse other partcipant is still in a meeting so entry will not be erased.

But in case of a single participant is there in a meeting and refreshes the page then Terminate request will go and then the entry will be erased from DB… so there is no active room… this time again user has to join from the beginning we wanted to avoid this.

Hum, I think this should be handled in the backend.
I guess you are deleting the DB entry when the room is destroyed. Then don’t do that, when you have a room destroyed event, schedule a timer in prosody and in 20 seconds check, if room exist do nothing otherwise delete it from DB.
We have something similar in jicofo, but for single participants call, everytime there is one participant in the call we schedule a check to destroy the session, if meanwhile someone joins we stop the timer.

1 Like