From f3e7ad3f21eb3545cbdaf023534d7a3d943a966e Mon Sep 17 00:00:00 2001 From: Paras Date: Wed, 4 Oct 2023 11:58:59 +0530 Subject: [PATCH] fix: if-else statement code --- library/src/helpers/server.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/library/src/helpers/server.ts b/library/src/helpers/server.ts index eb6bcf9ca..c5e9d2f9d 100644 --- a/library/src/helpers/server.ts +++ b/library/src/helpers/server.ts @@ -59,13 +59,12 @@ export class ServerHelpers { } else { securityProtocol = 'PLAINTEXT'; } + } else if (securitySchema) { + securityProtocol = 'SASL_SSL'; } else { - if (securitySchema) { - securityProtocol = 'SASL_SSL'; - } else { - securityProtocol = 'SSL'; - } + securityProtocol = 'SSL'; } + if (securitySchema) { switch (securitySchema.type()) { case 'plain':