mirror of
https://github.com/knex/knex.git
synced 2026-01-05 19:47:55 +00:00
Avoid connection getting stuck on socket hangup (#4157)
This commit is contained in:
parent
84cee6c445
commit
3394a02935
@ -38,7 +38,13 @@ module.exports = class Transaction_MSSQL extends Transaction {
|
||||
this._rejecter(err);
|
||||
},
|
||||
(err) => {
|
||||
if (error) err.originalError = error;
|
||||
if (error) {
|
||||
try {
|
||||
err.originalError = error;
|
||||
} catch (_err) {
|
||||
// This is to handle https://github.com/knex/knex/issues/4128
|
||||
}
|
||||
}
|
||||
return this._rejecter(err);
|
||||
}
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user