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