aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorturret <turret@duck.com>2024-01-11 19:15:07 +0000
committerturret <turret@duck.com>2024-01-11 19:15:07 +0000
commit9b126ca498e5c26a51997c9a87b5b01b152244fa (patch)
tree53c68ad52b6ce8a2d82626be02f2660b5c930aad /net
parent419d3c7562892e7e636632a499e20ad602a651bc (diff)
downloaddiscord-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index da8680d..a1f013b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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)