refactor: ServerApp use if in places of multi ternary ops for readablitly
This commit is contained in:
parent
0474e10b03
commit
7fe50748f3
1 changed files with 8 additions and 1 deletions
|
|
@ -537,7 +537,14 @@ void ServerApp::handleResume()
|
|||
ClientListener *ServerApp::openClientListener(const NetworkAddress &address)
|
||||
{
|
||||
using enum SecurityLevel;
|
||||
auto securityLevel = args().m_enableCrypto ? args().m_chkPeerCert ? PeerAuth : Encrypted : PlainText;
|
||||
auto securityLevel = PlainText;
|
||||
if (args().m_enableCrypto) {
|
||||
if (args().m_chkPeerCert) {
|
||||
securityLevel = PeerAuth;
|
||||
} else {
|
||||
securityLevel = Encrypted;
|
||||
}
|
||||
}
|
||||
|
||||
auto *listen = new ClientListener(getAddress(address), getSocketFactory(), m_events, securityLevel);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue