Use websocket instead of bosh and refresh the room repeatedly. If the user exits normally, it will not

  1. In modules_ Enabled enables websocket
modules_ enabled = {



  1. The global part is configured as follows
consider_ websocket_ secure = true;

cross_ domain_ websocket = true;

think_ websocket_ secure = true;

smacks_ max_ unacked_ stanzas = 5;

smacks_ hibernation_ time = 60;

smacks_ max_ hibernated_ sessions = 1;

smacks_ max_ old_ sessions = 1;

component_ interfaces = { "" };
  1. Nginx is configured as follows
location = /xmpp-websocket {

proxy_ pass :5280/xmpp-websocket?prefix=$prefix&$args;

proxy_ http_ version 1.1;

proxy_ set_ header Upgrade $http_ upgrade;

proxy_ set_ header Connection "upgrade";

proxy_ set_ header Host $http_ host;

tcp_ nodelay on;


In a room with more than two people, refresh the browser repeatedly and use websocket.
After refreshing, the user is still in the room, but bosh is used