Replaced a sync file operation by an async one, to avoid blocking the server.
This commit is contained in:
parent
afbc78d0e6
commit
cd97d91f79
@ -12,6 +12,7 @@
|
|||||||
### Minor changes and fixes
|
### Minor changes and fixes
|
||||||
|
|
||||||
* Fix ConverseJS build: translations were missing, and only english was available.
|
* Fix ConverseJS build: translations were missing, and only english was available.
|
||||||
|
* Replaced a sync file operation by an async one, to avoid blocking the server.
|
||||||
|
|
||||||
## 8.2.1
|
## 8.2.1
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ async function getProsodyFilePaths (options: RegisterServerOptions): Promise<Pro
|
|||||||
let certsDir: string | undefined = path.resolve(dir, 'certs')
|
let certsDir: string | undefined = path.resolve(dir, 'certs')
|
||||||
let certsDirIsCustom = false
|
let certsDirIsCustom = false
|
||||||
if (settings['prosody-room-allow-s2s'] && (settings['prosody-certificates-dir'] as string ?? '') !== '') {
|
if (settings['prosody-room-allow-s2s'] && (settings['prosody-certificates-dir'] as string ?? '') !== '') {
|
||||||
if (!fs.statSync(settings['prosody-certificates-dir'] as string).isDirectory()) {
|
if (!(await fs.promises.stat(settings['prosody-certificates-dir'] as string)).isDirectory()) {
|
||||||
// We can throw an exception here...
|
// We can throw an exception here...
|
||||||
// Because if the user input a wrong directory, the plugin will not register,
|
// Because if the user input a wrong directory, the plugin will not register,
|
||||||
// and he will never be able to fix the conf
|
// and he will never be able to fix the conf
|
||||||
|
Loading…
Reference in New Issue
Block a user