Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
const self = this;
// Send a message through wsConnection
return new Promise((resolve: (value?: any | PromiseLike<any>) => void, reject: (reason?: any) => void) => {
- let messageToSend;
+ let messageToSend: string;
// Type of message
switch (messageType) {
// Request
// Handle dups in buffer
for (const message of this._messageQueue) {
// Same message
- if (JSON.stringify(messageToSend) === JSON.stringify(message)) {
+ if (messageToSend === message) {
dups = true;
break;
}