lib/zold/node/front.rb in zold-0.29.20 vs lib/zold/node/front.rb in zold-0.29.21

- old
+ new

@@ -96,11 +96,14 @@ error(400, 'Can\'t detect your IP') if request.ip.nil? || request.ip.empty? Thread.current.thread_variable_set(:ip, request.ip) @start = Time.now if !settings.opts['halt-code'].empty? && params[:halt] && params[:halt] == settings.opts['halt-code'] settings.log.info('Halt signal received, shutting the front end down...') - Front.stop! + Thread.start do + sleep 0.1 + Front.stop! + end end check_header(Http::NETWORK_HEADER) do |header| if header != settings.opts['network'] error(400, "Network name mismatch at #{request.url}, #{request.ip} is in '#{header}', \ while #{settings.address} is in '#{settings.opts['network']}'") @@ -469,10 +472,10 @@ locals: { title: '/journal', description: 'The journal', id: params[:id], files: DirItems.new(settings.journal_dir).fetch.sort.reverse.select do |f| - !params[:id] || f.start_with?(params[:id]) + !params[:id] || f.include?(params[:id]) end, dir: settings.journal_dir } ) end