From: Jérôme Benoit Date: Tue, 5 Mar 2024 10:46:39 +0000 (+0100) Subject: fix(simulator): ftp client incorrect access request when custom port present in the uri X-Git-Tag: v1.3.0~55 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2c975e3a297739c2e71d5a2c1383452373b41bb3;p=e-mobility-charging-stations-simulator.git fix(simulator): ftp client incorrect access request when custom port present in the uri closes #1007 Contributed-by: @nahueld Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index 1456e237..83230fb8 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -1472,7 +1472,7 @@ export class OCPP16IncomingRequestService extends OCPPIncomingRequestService { create({ gzip: true }, logFiles).pipe(createWriteStream(diagnosticsArchive)) ftpClient = new Client() const accessResponse = await ftpClient.access({ - host: uri.host, + host: uri.hostname, ...(isNotEmptyString(uri.port) && { port: convertToInt(uri.port) }), ...(isNotEmptyString(uri.username) && { user: uri.username }), ...(isNotEmptyString(uri.password) && { password: uri.password })