@social-mail/social-mail-web-server 1.8.371 → 1.8.372
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/dist/WebServer.d.ts.map +1 -1
- package/dist/WebServer.js +4 -0
- package/dist/WebServer.js.map +1 -1
- package/dist/server/storage/LockFile.d.ts.map +1 -1
- package/dist/server/storage/LockFile.js +3 -1
- package/dist/server/storage/LockFile.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/WebServer.ts +4 -0
- package/src/server/storage/LockFile.ts +3 -1
package/package.json
CHANGED
package/src/WebServer.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { existsSync, mkdirSync, unlinkSync, statSync, utimesSync, writeFileSync
|
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import sleep from "../../common/sleep.js";
|
|
6
6
|
import { globalEnv } from "../../common/globalEnv.js";
|
|
7
|
+
import TimeoutError from "../../common/errors/TimeoutError.js";
|
|
7
8
|
|
|
8
9
|
const tmpdir = globalEnv.tmpDir;
|
|
9
10
|
|
|
@@ -56,7 +57,8 @@ export default class LockFile implements Disposable {
|
|
|
56
57
|
}while(now < till);
|
|
57
58
|
|
|
58
59
|
if (throwOnFail) {
|
|
59
|
-
|
|
60
|
+
lastError ??= new TimeoutError("lock timed out");
|
|
61
|
+
throw new Error(`Could not acquire lock ${lockFile}, Reason: ${lastError?.stack ?? lastError?.toString()}`);
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
return {
|