mirror of
https://github.com/appy-one/acebase-server.git
synced 2026-06-30 06:02:05 -06:00
Handle transactions that timeout without starting (#94)
* Handle transactions that timeout without starting * Use shorter syntax
This commit is contained in:
parent
725f2bf6e3
commit
9babf1cd6f
1 changed files with 1 additions and 1 deletions
|
|
@ -265,7 +265,7 @@ export const addWebsocketServer = (env: RouteInitEnvironment) => {
|
|||
finish: undefined,
|
||||
timeout: setTimeout(() => {
|
||||
delete client.transactions[tx.id];
|
||||
tx.finish(); // Finish without value cancels the transaction
|
||||
tx.finish?.(); // Finish without value cancels the transaction
|
||||
env.log.error(LOG_ACTION, 'timeout', LOG_DETAILS);
|
||||
serverManager.send(event.socket, 'tx_error', { id: tx.id, reason: 'timeout' });
|
||||
}, TRANSACTION_TIMEOUT_MS),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue