repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
501f774
)
fix: ensure event is emitted before task promise rejection
author
Jérôme Benoit
<jerome.benoit@sap.com>
Wed, 21 Jun 2023 22:12:35 +0000
(
00:12
+0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Wed, 21 Jun 2023 22:12:35 +0000
(
00:12
+0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index 9af3d707c35088356aae00f6192c1a716e9a8bf9..058b43b8a37104b29d1d15978613c42735072547 100644
(file)
--- a/
src/pools/abstract-pool.ts
+++ b/
src/pools/abstract-pool.ts
@@
-767,10
+767,10
@@
export abstract class AbstractPool<
const promiseResponse = this.promiseResponseMap.get(message.id)
if (promiseResponse != null) {
if (message.taskError != null) {
- promiseResponse.reject(message.taskError.message)
if (this.emitter != null) {
this.emitter.emit(PoolEvents.taskError, message.taskError)
}
+ promiseResponse.reject(message.taskError.message)
} else {
promiseResponse.resolve(message.data as Response)
}