Fix errors when msfrpc is killed outside of msfgui.

git-svn-id: file:///home/svn/framework3/trunk@11720 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Weeks 2011-02-08 00:51:01 +00:00
parent 953630aa80
commit fd03824a46
3 changed files with 2 additions and 0 deletions

Binary file not shown.

View File

@ -49,6 +49,7 @@ public class MsfguiApp extends SingleFrameApplication {
props = new HashMap();//ensure existence
}
propRoot = props;
RpcConnection.disableDb = Boolean.TRUE.equals(propRoot.get("disableDb")); //restore this, since it can't be checked on connect
if(propRoot.get("recentList") == null)
propRoot.put("recentList", new LinkedList());
Runtime.getRuntime().addShutdownHook(new Thread(){

View File

@ -85,6 +85,7 @@ public class RpcConnection {
} else {
connection = new Socket(host, port);
}
connection.setSoTimeout(5000); //Five second timeout
sout = connection.getOutputStream();
sin = connection.getInputStream();
Map results = exec("auth.login",new Object[]{username, this.password});