Browse Source

[master] check if the config session is up when checking for queued msgs

this should fix the systest problem; it seems to trigger a race condition in initialization. If the config session isn't up yet, there will certainly not be any queued messages yet, so simply skipping that should be ok.
Jelte Jansen 13 years ago
parent
commit
c35d0dde3e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/bin/auth/auth_srv.cc

+ 3 - 2
src/bin/auth/auth_srv.cc

@@ -219,8 +219,9 @@ class ConfigChecker : public SimpleCallback {
 public:
     ConfigChecker(AuthSrv* srv) : server_(srv) {}
     virtual void operator()(const IOMessage&) const {
-        if (server_->getConfigSession()->hasQueuedMsgs()) {
-            server_->getConfigSession()->checkCommand();
+        ModuleCCSession* cfg_session = server_->getConfigSession();
+        if (cfg_session != NULL && cfg_session->hasQueuedMsgs()) {
+            cfg_session->checkCommand();
         }
     }
 private: