BoraVyvorant/eve-fuelbot

Unpowered structure causes fuelbot to crash

Closed this issue · 0 comments

If you have a structure which is in low power state because no services are active, the fuel_expires value is nil rather than a DateTime and the following code fails:

# Sort by fuel expiry time.
structures.sort_by!(&:fuel_expires)

Error is:

fuelbot.rb:74:in `sort_by': comparison of DateTime with nil failed (ArgumentError)