repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix error handling at OCPP message sending
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ui-server
/
UIHttpServer.ts
diff --git
a/src/charging-station/ui-server/UIHttpServer.ts
b/src/charging-station/ui-server/UIHttpServer.ts
index 822244f96081305ef939ae7f107d67f9c840c1a4..37c579dc56a552dc26dbd57ae515378820e9e2d9 100644
(file)
--- a/
src/charging-station/ui-server/UIHttpServer.ts
+++ b/
src/charging-station/ui-server/UIHttpServer.ts
@@
-47,7
+47,6
@@
export default class UIHttpServer extends AbstractUIServer {
'Content-Type': 'application/json',
})
.end(JSON.stringify(payload));
'Content-Type': 'application/json',
})
.end(JSON.stringify(payload));
- this.responseHandlers.delete(uuid);
} else {
logger.error(
`${this.logPrefix(moduleName, 'sendResponse')} Response for unknown request id: ${uuid}`
} else {
logger.error(
`${this.logPrefix(moduleName, 'sendResponse')} Response for unknown request id: ${uuid}`
@@
-58,6
+57,8
@@
export default class UIHttpServer extends AbstractUIServer {
`${this.logPrefix(moduleName, 'sendResponse')} Error at sending response id '${uuid}':`,
error
);
`${this.logPrefix(moduleName, 'sendResponse')} Error at sending response id '${uuid}':`,
error
);
+ } finally {
+ this.responseHandlers.delete(uuid);
}
}
}
}