File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ class Client
1414 extend Forwardable
1515 using Ably ::Util ::AblyExtensions
1616
17- DOMAIN = 'main.realtime.ably.net'
18-
1917 # A {Aby::Realtime::Channels} object.
2018 #
2119 # @spec RTC3, RTS1
Original file line number Diff line number Diff line change @@ -18,9 +18,6 @@ class Client
1818 extend Forwardable
1919 using Ably ::Util ::AblyExtensions
2020
21- # Default Ably domain for REST
22- DOMAIN = 'main.realtime.ably.net'
23-
2421 MAX_MESSAGE_SIZE = 65536 # See spec TO3l8
2522 MAX_FRAME_SIZE = 524288 # See spec TO3l8
2623
@@ -221,12 +218,10 @@ def initialize(options)
221218 options_fallback_hosts
222219 when custom_host || options [ :realtime_host ] || custom_port || custom_tls_port
223220 [ ]
224- when endpoint
225- if endpoint . start_with? ( 'nonprod:' )
226- CUSTOM_ENVIRONMENT_FALLBACKS_SUFFIXES . map { |host | "#{ endpoint . gsub ( 'nonprod:' , '' ) } .#{ host } " }
227- else
228- CUSTOM_ENVIRONMENT_FALLBACKS_SUFFIXES . map { |host | "#{ endpoint } .#{ host } " }
229- end
221+ when endpoint . start_with? ( 'nonprod:' )
222+ CUSTOM_ENVIRONMENT_FALLBACKS_SUFFIXES . map { |host | "#{ endpoint . gsub ( 'nonprod:' , '' ) } .#{ host } " }
223+ when endpoint != 'main'
224+ CUSTOM_ENVIRONMENT_FALLBACKS_SUFFIXES . map { |host | "#{ endpoint } .#{ host } " }
230225 else
231226 Ably ::FALLBACK_HOSTS
232227 end
You can’t perform that action at this time.
0 commit comments