Implement support for car/names.feature

This commit is contained in:
Dennis
2024-06-13 17:02:28 +02:00
parent d985459696
commit 37f5780472
16 changed files with 442 additions and 152 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class OSRMBaseLoader{
let retry = (err) => {
if (err) {
if (retryCount < this.scope.OSRM_CONNECTION_RETRIES) {
const timeoutMs = 10 * Math.pow(this.scope.OSRM_CONNECTION_EXP_BACKOFF_COEF, retryCount);
const timeoutMs = 10 * Math.pow(1.1, retryCount);
retryCount++;
setTimeout(() => { tryConnect(this.scope.OSRM_IP, this.scope.OSRM_PORT, retry); }, timeoutMs);
} else {
+2
View File
@@ -29,6 +29,8 @@ module.exports = function () {
var params = this.paramsToString(parameters);
this.query = baseUri + (params.length ? '/' + params : '');
console.log(this.query);
request(this.query, (err, res, body) => {
if (err && err.code === 'ECONNREFUSED') {
return cb(new Error('*** osrm-routed is not running.'));