Skip to content
Browse files

Fixing interrupt for message buffering.

  • Loading branch information...
1 parent 455745a commit c63a4fc1b1a4463aafc151b89c4ebbd6103c1dce @elElmo committed Mar 27, 2012
Showing with 13 additions and 8 deletions.
  1. +13 −8 src/rainbow/controller/application/Controller.java
View
21 src/rainbow/controller/application/Controller.java
@@ -25,7 +25,7 @@ public Controller() {
public Controller(String host) {
executor = Executors.newSingleThreadExecutor();
try {
- protocol = new ControllerProtocol(host);
+ protocol = new ControllerProtocol(host, this);
} catch (IOException e) {
System.out.println("Could not connect to scheduler, has it been started?");
System.exit(1);
@@ -75,15 +75,20 @@ public void workBlockComplete(WorkBlockSetup b) {
public void bruteForce(WorkBlockSetup block) {
current = new BruteForcer(query, block, listener);
- current.start();
+ current.start();
+ try {
+ current.join();
+ } catch (InterruptedException e) {
+ current.interrupt();
+ }
}
- @Override
- public void interrupt() {
- super.interrupt();
- protocol.shutdown();
- executor.shutdown();
- }
+// @Override
+// public void interrupt() {
+// super.interrupt();
+// protocol.shutdown();
+// executor.shutdown();
+// }
public static void main(String[] s) {
if (s.length > 0) {

0 comments on commit c63a4fc

Please sign in to comment.
Something went wrong with that request. Please try again.