@imqueue/rpc 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/IMQLock.js +8 -1
package/package.json
CHANGED
package/src/IMQLock.js
CHANGED
|
@@ -80,7 +80,14 @@ class IMQLock {
|
|
|
80
80
|
if (IMQLock.deadlockTimeout) {
|
|
81
81
|
// avoid dead-locks using timeouts
|
|
82
82
|
timer = setTimeout(() => {
|
|
83
|
-
|
|
83
|
+
let dumpStr = '';
|
|
84
|
+
try {
|
|
85
|
+
dumpStr = JSON.stringify(IMQLock.metadata[key]);
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
dumpStr = 'Unable to stringify metadata';
|
|
89
|
+
}
|
|
90
|
+
const err = new Error(`Lock timeout, "${key}" call rejected, metadata: ${dumpStr}`);
|
|
84
91
|
clearTimeout(timer);
|
|
85
92
|
timer = null;
|
|
86
93
|
IMQLock.release(key, null, err);
|