ping_timeout when client is using CSI unavailable
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- erlang, javascript
- Domain
- backend, networking
Research direction
Start by reproducing the interaction between the shown mod_ping settings, CSI unavailable state, and the websocket session; the report names no server files or tests. Trace how ping_timeout is handled while CSI is unavailable and define whether the connection should remain open until availability returns, then verify that the client can send the shown available stanza afterward.
Written by the indexing model from the issue text.
Description
Environment
- ejabberd version: 21.12
- Erlang version: Erlang/OTP 24
- OS: macOS Monterey 12.4
- Installed from: own fork for ejabberd 21.12
Configuration (only if needed):
websocket_ping_interval: 60
websocket_timeout: 300
mod_ping:
send_pings: true
ping_interval: 45 secs
timeout_action: kill
mod_client_state:
queue_chat_states: true
queue_presence: true
Errors from error.log/crash.log
No errors
Bug description
I have mobile strophejs client which has a logic to send CSI unavailable stanza when client is going to background mode. After client is disabled via CSI plugin, it is not able to receive ping requests and response to them and at the result the client connection is closing automatically by ping_timeout after few minutes sitting in background mode.
How to prevent that web-socket session from being killed via ping timeout as client is not longer able to response for ping requests but I want to have that connection to be stable till user will go to the available mode?
In the client app I'm seeing Cannot read property 'send' of null from below code when client is trying to go to available mode after sitting in background mode for a while:
this._connection.send($pres({
xmlns: Strophe.NS.CLIENT,
type: 'available',
}).c('csi', { xmlns: Strophe.NS.CSI }).up());
(websocket|<0.28201.4>) Closing c2s session for 560dbc22-44df-4f8e-a78e-d615c0e51393@...com/56c385d6-1fd2-4aec-8e6c-9f30f50fa5e2: Connection failed: ping_timeout
- Dominant language
- Erlang
- Stars
- 6.7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from processone/ejabberd
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
processone/ejabberd#4597 ·
-
API permissions Open
processone/ejabberd#4619 · 3 comments · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
processone/ejabberd#4616 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
processone/ejabberd#4614 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
processone/ejabberd#4613 · 1 comment ·
All issues in processone/ejabberd
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·