From 679125d996f3e31bd2cf55b48c1b02cd94403770 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 1 Jan 2021 13:22:43 +0100 Subject: [PATCH] Rename a constant. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 2 +- src/utils/Constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index d43b975f..7da49c30 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1099,7 +1099,7 @@ export default class ChargingStation { resolve(); } else if (messageType === MessageType.CALL_ERROR_MESSAGE) { // Send timeout - setTimeout(() => rejectCallback(new OCPPError(commandParams.code ? commandParams.code : ErrorType.GENERIC_ERROR, commandParams.message ? commandParams.message : `Timeout for message id '${messageId}' with content '${messageToSend}'`, commandParams.details ? commandParams.details : {})), Constants.OCPP_WEBSOCKET_TIMEOUT); + setTimeout(() => rejectCallback(new OCPPError(commandParams.code ? commandParams.code : ErrorType.GENERIC_ERROR, commandParams.message ? commandParams.message : `Timeout for message id '${messageId}' with content '${messageToSend}'`, commandParams.details ? commandParams.details : {})), Constants.OCPP_ERROR_TIMEOUT); } // Function that will receive the request's response diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 5d1825b6..f6849dfe 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -24,7 +24,7 @@ export default class Constants { static readonly OCPP_VERSION_16 = '1.6'; static readonly OCPP_VERSION_20 = '2.0'; - static readonly OCPP_WEBSOCKET_TIMEOUT = 60000; // 60 sec + static readonly OCPP_ERROR_TIMEOUT = 60000; // 60 sec static readonly CHARGING_STATION_DEFAULT_RESET_TIME = 60000; // Ms static readonly CHARGING_STATION_ATG_WAIT_TIME = 2000; // Ms -- 2.34.1