Small fix
diff --git a/src/core/client_config/uri_parser.c b/src/core/client_config/uri_parser.c
index 615aa4e..410a61c 100644
--- a/src/core/client_config/uri_parser.c
+++ b/src/core/client_config/uri_parser.c
@@ -98,8 +98,8 @@
 
   if (uri_text[scheme_end + 1] == '/' && uri_text[scheme_end + 2] == '/') {
     authority_begin = scheme_end + 3;
-    for (i = authority_begin; uri_text[i] != 0; i++) {
-      if (uri_text[i] == '/' && authority_end == -1) {
+    for (i = authority_begin; uri_text[i] != 0 && authority_end == -1; i++) {
+      if (uri_text[i] == '/') {
         authority_end = i;
       }
       if (uri_text[i] == '?') {