rapid7/metasploit-framework — pull request #2263 by wchen-r7 (2013-08-21 00:35:17+00:00)
Title: [FixRM #8322] - Fix undefined method code error due to a timeout

res needs to be checked before accessing method code(), see:
http://dev.metasploit.com/redmine/issues/8322