Skip to content

Commit

Permalink
refactor: improve if-else code in server.ts (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
parasss19 authored Oct 12, 2023
1 parent c54659d commit 9e49741
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions library/src/helpers/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 9e49741

Please sign in to comment.