File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
templates/android/library/src/main/java/io/package Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ class Client @JvmOverloads constructor(
179
179
*/
180
180
@Throws({{ spec .title | caseUcfirst }}Exception::class)
181
181
fun setEndpoint(endpoint: String): Client {
182
- if (runCatching { URL(endpoint).protocol !in listOf("http", "https") }.getOrDefault(true )) {
182
+ if (runCatching { URL(endpoint).protocol !in listOf("http", "https") }.getOrDefault(false )) {
183
183
throw {{spec .title | caseUcfirst }}Exception("Invalid endpoint URL: $endpoint")
184
184
}
185
185
@@ -198,7 +198,7 @@ class Client @JvmOverloads constructor(
198
198
*/
199
199
@Throws({{ spec .title | caseUcfirst }}Exception::class)
200
200
fun setEndpointRealtime(endpoint: String): Client {
201
- if (runCatching { URL(endpoint).protocol !in listOf("ws", "wss") }.getOrDefault(true )) {
201
+ if (runCatching { URL(endpoint).protocol !in listOf("ws", "wss") }.getOrDefault(false )) {
202
202
throw {{spec .title | caseUcfirst }}Exception("Invalid realtime endpoint URL: $endpoint")
203
203
}
204
204
You can’t perform that action at this time.
0 commit comments