| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ function onMessage($client_id, $ws) | |||
| 17 | 17 | Swoole\Error::$echo_html = false; | |
| 18 | 18 | ||
| 19 | 19 | $AppSvr = new WebSocket(); | |
| 20 | - $AppSvr->loadSetting("./swoole.ini"); //加载配置文件 | ||
| 20 | + $AppSvr->loadSetting(__DIR__."/swoole.ini"); //加载配置文件 | ||
| 21 | 21 | $AppSvr->setLogger(new \Swoole\Log\EchoLog(true)); //Logger | |
| 22 | 22 | ||
| 23 | 23 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -349,12 +349,12 @@ function opcodeSwitch($client_id, $ws) | |||
| 349 | 349 | } | |
| 350 | 350 | function onConnect($serv, $client_id, $from_id) | |
| 351 | 351 | { | |
| 352 | - // $this->log("connected client_id = $client_id"); | ||
| 352 | + $this->log("connected client_id = $client_id"); | ||
| 353 | 353 | } | |
| 354 | 354 | function onClose($serv, $client_id, $from_id) | |
| 355 | 355 | { | |
| 356 | - // $this->log("close client_id = $client_id"); | ||
| 357 | - unset($this->ws_list[$client_id], $this->connections[$client_id]); | ||
| 356 | + $this->log("close client_id = $client_id"); | ||
| 357 | + unset($this->ws_list[$client_id], $this->connections[$client_id], $this->requests[$client_id]); | ||
| 358 | 358 | } | |
| 359 | 359 | /** | |
| 360 | 360 | * Close a connection. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments