processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.03k stars 1.5k forks source link

In Client application if we do suddenly Internet data -OFF the Presence status not reflected to opponents #4013

Closed prabhugithubme closed 1 year ago

prabhugithubme commented 1 year ago

In Client application if we do suddenly Internet data -OFF the Presence status not reflected to opponents.

In this case after around 2 minutes only server side socket( client App to server socket) getting closed. So until that in others roaster list about this user presence status is online. pls guide me to resolve this issue.

I am sharing module config details from ejabberd.yml .

Environment

Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml

```yaml modules: mod_trago_push: db_type: sql mod_adhoc: {} mod_cron: tasks: - time: 2 units: days ctl: delete_old_mam_messages arguments: - "all" - "20" mod_admin_extra: {} mod_announce: access: announce mod_avatar: {} mod_blocking: {} mod_bosh: {} mod_caps: {} mod_carboncopy: {} mod_client_state: {} mod_configure: {} mod_disco: {} mod_fail2ban: {} mod_http_api: {} mod_http_upload: put_url: https://test.test.net:6775 external_secret: "test-secret" max_size: 204857600 thumbnail: true mod_last: db_type: sql mod_mam: ## Mnesia is limited to 2GB, better to use an SQL backend ## For small servers SQLite is a good fit and is very easy ## to configure. Uncomment this when you have SQL configured: db_type: sql assume_mam_usage: true default: always mod_mqtt: {} mod_muc: db_type: sql access: - allow access_admin: - allow: admin access_create: muc_create access_persistent: muc_create access_mam: - allow default_room_options: allow_subscription: true # enable MucSub mam: true history_size: 0 mod_muc_admin: {} mod_ping: {} mod_privacy: db_type: sql mod_private: db_type: sql mod_proxy65: access: local max_connections: 5 mod_pubsub: db_type: sql access_createnode: pubsub_createnode ignore_pep_from_offline: false ## true last_item_cache: false plugins: - flat - hometree - pep force_node_config: ## Avoid buggy clients to make their bookmarks public storage:bookmarks: access_model: whitelist mod_push: {} mod_push_keepalive: {} mod_register: ## Only accept registration requests from the "trusted" ## network (see access_rules section above). ## Think twice before enabling registration from any ## address. See the Jabber SPAM Manifesto for details: ## https://github.com/ge0rg/jabber-spam-fighting-manifesto ip_access: trusted_network mod_roster: db_type: sql versioning: true mod_s2s_dialback: {} mod_shared_roster: db_type: sql mod_vcard: db_type: sql search: true allow_return_all: true mod_vcard_xupdate: use_cache: false mod_version: show_os: false ```
badlop commented 1 year ago

When a client disconnects, ejabberd takes 2 minutes to notice that?

Maybe mod_ping helps, see https://docs.ejabberd.im/admin/configuration/modules/#mod-ping

prefiks commented 1 year ago

Are you using stream management with resume option? If so that how it works, it keeps your sesssion alive for some time to allow resuming it in case connection get dropped.

prabhugithubme commented 1 year ago

The issue here is - if sudden internet off ... The status of the current user is not reflected to opponent.
For Ex: User A and User B both are chatting. In certain situation internet connection gone from User A that time How user B will know about the presence status of User A?. So how to show presence status to all others about User A is not in live in that situation?.

mremond commented 1 year ago

That's how TCP/IP work. If you want to go further, you need to configure extra checks as suggested using mod_ping or stream management.