Land #4174, @hmoore-r7's fix for #4170

This commit is contained in:
Jon Hart 2014-11-12 07:02:22 -08:00
commit ae339cb59f
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 7 additions and 1 deletions

View File

@ -59,9 +59,15 @@ def run
@tl = [] @tl = []
# #
# Sanity check threading on different platforms # Sanity check threading given different conditions
# #
if datastore['CPORT'].to_i != 0 && threads_max > 1
print_error("Warning: A maximum of one thread is possible when a source port is set (CPORT)")
print_error("Thread count has been adjusted to 1")
threads_max = 1
end
if(Rex::Compat.is_windows) if(Rex::Compat.is_windows)
if(threads_max > 16) if(threads_max > 16)
print_error("Warning: The Windows platform cannot reliably support more than 16 threads") print_error("Warning: The Windows platform cannot reliably support more than 16 threads")