diff options
author | turret <turret@duck.com> | 2024-01-11 19:15:07 +0000 |
---|---|---|
committer | turret <turret@duck.com> | 2024-01-11 19:15:07 +0000 |
commit | 9b126ca498e5c26a51997c9a87b5b01b152244fa (patch) | |
tree | 53c68ad52b6ce8a2d82626be02f2660b5c930aad /net | |
parent | 419d3c7562892e7e636632a499e20ad602a651bc (diff) | |
download | discord-bot-skeleton-9b126ca498e5c26a51997c9a87b5b01b152244fa.tar.gz discord-bot-skeleton-9b126ca498e5c26a51997c9a87b5b01b152244fa.tar.bz2 discord-bot-skeleton-9b126ca498e5c26a51997c9a87b5b01b152244fa.zip |
net: minor optimisations
break out of WSS compatability checker loop when we find a valid match
for wss
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -26,8 +26,10 @@ void net_get_gateway_url() const char * const* curl_protocols = curl_version->protocols; int wss_supported = 0; for(int i = 0; curl_protocols[i]; ++i) { - if(strcmp(curl_protocols[i], "wss") == 0) + if(strcmp(curl_protocols[i], "wss") == 0) { wss_supported = 1; + break; + } } if(!wss_supported) |