catch exception rised in explorer 8
[brisk.git] / web / Obj / sac-a-push.phh
index 5d62a37..84f1555 100644 (file)
@@ -339,7 +339,7 @@ class Sac_a_push {
         $thiz->rndstr = "";
         for ($i = 0 ; $i < 4096 ; $i++) {
             if (($i % 128) == 0)
-                $thiz->rndstr .= "\n";
+                $thiz->rndstr .= " ";
             else
                 $thiz->rndstr .= chr(mt_rand(65, 90));
         }
@@ -414,7 +414,7 @@ class Sac_a_push {
 
     function run()
     {
-        GLOBAL $DOCUMENT_ROOT, $HTTP_HOST, $G_with_splash;
+        GLOBAL $DOCUMENT_ROOT, $HTTP_HOST, $G_with_splash, $G_black_list;
 
         if ($this->main_loop) {
             return (FALSE);
@@ -545,6 +545,14 @@ class Sac_a_push {
                                 if ($line == "reload") {
                                     require("$DOCUMENT_ROOT/Etc/".BRISK_CONF);
                                 }
+                                else if ($line == "shutdown") {
+                                    if ($this->app->dump_data()) {
+                                        exit(0);
+                                    }
+                                    else {
+                                        exit(1);
+                                    }
+                                }
                             }
                             else {
                                 $key = array_search("$sock", $this->socks);