Projects tigase _server server-core Commits 45310f6f
ctrl k
  • Fix for #458 Clustering strategy problem with user connecting twice with the same resource - applied patch to notify other nodes when user was disconnected by SessionManager calling handleLogout

  • Loading...
  • Andrzej Wójcik committed 1 decade ago
    45310f6f
    1 parent 460d0661
  • src/main/java/tigase/cluster/SessionManagerClustered.java
    ■ ■ ■ ■ ■ ■
    skipped 171 lines
    172 172   strategy.handleLocalUserLogin(userId, conn);
    173 173   }
    174 174   
     175 + @Override
     176 + public void handleLogout(BareJID userId, XMPPResourceConnection conn) {
     177 + // Exception here should not normally happen, but if it does, then
     178 + // consequences might be severe, let's catch it then
     179 + try {
     180 + if (conn.isAuthorized() && conn.isResourceSet()) {
     181 + strategy.handleLocalUserLogout(userId, conn);
     182 + }
     183 + } catch (Exception ex) {
     184 + log.log(Level.WARNING, "This should not happen, check it out!, ", ex);
     185 + }
     186 + super.handleLogout(userId, conn); //To change body of generated methods, choose Tools | Templates.
     187 + }
     188 +
    175 189   /**
    176 190   * Initialize a mapping of key/value pairs which can be used in scripts
    177 191   * loaded by the server
    skipped 517 lines
Please wait...
Page is in error, reload to recover