(error: SqlError)
| 2137 | } |
| 2138 | |
| 2139 | const onFatal = (error: SqlError): void => { |
| 2140 | if (done) return |
| 2141 | done = true |
| 2142 | finished = true |
| 2143 | if (failure === undefined) failure = error |
| 2144 | drainDone?.() |
| 2145 | deliver() |
| 2146 | } |
| 2147 | // `conn.fatal` notifies the registered consumer; the direct `onFatal` call |
| 2148 | // covers the case where the connection was already dead. |
| 2149 | const failFatal = (error: SqlError): void => { |