1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

All: Resolves #5754: Improved error message when synchronising with Joplin Server

This commit is contained in:
Laurent Cozic
2021-11-19 11:26:01 +00:00
parent c0b76cbd55
commit 0ec0d87e71
9 changed files with 128 additions and 49 deletions

View File

@ -1,5 +1,5 @@
const Logger = require('@joplin/lib/Logger').default;
const { netUtils } = require('@joplin/lib/net-utils.js');
const { findAvailablePort } = require('@joplin/lib/net-utils');
const http = require('http');
const urlParser = require('url');
@ -36,7 +36,7 @@ class ResourceServer {
}
async start() {
this.port_ = await netUtils.findAvailablePort([9167, 9267, 8167, 8267]);
this.port_ = await findAvailablePort([9167, 9267, 8167, 8267]);
if (!this.port_) {
this.logger().error('Could not find available port to start resource server. Please report the error at https://github.com/laurent22/joplin');
return;