fix(core): update

This commit is contained in:
2022-01-19 16:37:45 +01:00
parent 278b35c9c5
commit 00f22f9651
3 changed files with 21 additions and 21 deletions

View File

@ -122,13 +122,13 @@ export class SmartsocketClient {
// authentication flow
this.socketConnection.socket.on(
'requestAuth',
(requestAuthPayload: interfaces.IRequestAuthPayload) => {
(dataArg: interfaces.IRequestAuthPayload) => {
timer.reset();
logger.log('info', 'server requested authentication');
logger.log('info', `server ${dataArg.serverAlias} requested authentication`);
// lets register the authenticated event
this.socketConnection.socket.on('authenticated', async () => {
this.remoteShortId = requestAuthPayload.serverAlias;
this.remoteShortId = dataArg.serverAlias;
logger.log('info', 'client is authenticated');
this.socketConnection.authenticated = true;
await this.socketConnection.listenToFunctionRequests();