Skip to content

Commit

Permalink
set emergencystage to zero if no active route
Browse files Browse the repository at this point in the history
  • Loading branch information
emiltin committed Dec 13, 2023
1 parent b68f262 commit 9cb270e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rsmp/tlc/traffic_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -678,11 +678,12 @@ def handle_s0006 status_code, status_name=nil, options={}
if Proxy.version_meets_requirement? options[:sxl_version], '>=1.2'
log "S0006 is depreciated, use S0035 instead.", level: :warning
end
status = @emergency_routes.any?
case status_name
when 'status'
TrafficControllerSite.make_status @emergency_routes.include?(@last_emergency_route)
TrafficControllerSite.make_status status
when 'emergencystage'
TrafficControllerSite.make_status @last_emergency_route || 0
TrafficControllerSite.make_status status ? @last_emergency_route : 0
end
end

Expand Down

0 comments on commit 9cb270e

Please sign in to comment.