Skip to content

Commit

Permalink
Only recalculate when something was loaded
Browse files Browse the repository at this point in the history
Recalculations are time consuming, so only do it if necessary.
  • Loading branch information
zeroSteiner committed Mar 21, 2022
1 parent ff7b017 commit 28d3a5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/msf/core/module_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def create(reference_name)
# If there is no module associated with this class, then try to demand
# load it.
if klass.nil? or klass == Msf::SymbolicModule
framework.modules.load_cached_module(module_type, reference_name)

recalculate
if framework.modules.load_cached_module(module_type, reference_name)
recalculate
end

klass = fetch(reference_name, nil)
end
Expand Down

0 comments on commit 28d3a5c

Please sign in to comment.