| Conditions | 3 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | protected function tryAgainIfCausedByLostConnection(Exception $e, $dsn, $username, $password, $options) |
||
| 39 | { |
||
| 40 | // https://github.com/swoole/swoole-src/blob/a414e5e8fec580abb3dbd772d483e12976da708f/swoole_mysql_coro.c#L196 |
||
| 41 | if ($this->causedByLostConnection($e) || Str::contains($e->getMessage(), 'is closed')) { |
||
| 42 | return $this->createPdoConnection($dsn, $username, $password, $options); |
||
| 43 | } |
||
| 44 | |||
| 45 | throw $e; |
||
| 46 | } |
||
| 48 |