Skip to content

Commit

Permalink
Avoid magic number to make @wvu marginally happier
Browse files Browse the repository at this point in the history
  • Loading branch information
Tod Beardsley committed Jan 20, 2015
1 parent e88c4f1 commit 9017aa0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/msf/ui/console/command_dispatcher/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ class Core
# Constant for disclosure date formatting in search functions
DISCLOSURE_DATE_FORMAT = "%Y-%m-%d"

# Constant for a retry timeout on using modules before they're loaded
CMD_USE_TIMEOUT = 3

# Returns the list of commands supported by this command dispatcher
def commands
{
Expand Down Expand Up @@ -2421,7 +2424,7 @@ def cmd_use(*args)
mod = framework.modules.create(mod_name)
unless mod
# Try one more time; see #4549
sleep 3
sleep CMD_USE_TIMEOUT
mod = framework.modules.create(mod_name)
unless mod
print_error("Failed to load module: #{mod_name}")
Expand Down

0 comments on commit 9017aa0

Please sign in to comment.