Skip to content

Commit 0d09d1b

Browse files
committed
Replace 'Will listen on all interfaces' warning
The warning probably didn't make sense to many users and may have sounded ominous. Instead, inform user how to disable sharing after listing sharing URLs. Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
1 parent 7caf919 commit 0d09d1b

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

lib/sequenceserver.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def call(env)
116116

117117
# Run SequenceServer using WEBrick.
118118
def run
119-
check_host
120119
Server.run(self)
121120
rescue Errno::EADDRINUSE
122121
puts "** Could not bind to port #{config[:port]}."
@@ -140,6 +139,7 @@ def on_start
140139
puts ' To share your setup, please try one of the following: '
141140
puts " - http://#{ip_address}:#{config[:port]}"
142141
puts " - http://#{hostname}:#{config[:port]}" if hostname
142+
puts ' To disable sharing, set :host: key in config file to 127.0.0.1'
143143
end
144144
puts ' Press CTRL+C to quit.'
145145
open_in_browser(server_url)
@@ -216,16 +216,6 @@ def check_num_threads
216216
raise NUM_THREADS_INCORRECT
217217
end
218218

219-
# Check and warn user if host is 0.0.0.0 (default).
220-
def check_host
221-
# rubocop:disable Style/GuardClause
222-
if config[:host] == '0.0.0.0'
223-
logger.warn 'Will listen on all interfaces (0.0.0.0).' \
224-
' Consider using 127.0.0.1 (--host option).'
225-
end
226-
# rubocop:enable Style/GuardClause
227-
end
228-
229219
def load_extension
230220
return unless config[:require]
231221

0 commit comments

Comments
 (0)