Skip to content

Commit

Permalink
Fixing interrupt for message buffering.
Browse files Browse the repository at this point in the history
  • Loading branch information
frgorp committed Mar 28, 2012
1 parent 455745a commit c63a4fc
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/rainbow/controller/application/Controller.java
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c63a4fc

Please sign in to comment.