Skip to content

Commit

Permalink
Yield the thread on the client writer
Browse files Browse the repository at this point in the history
  • Loading branch information
ngallagher committed Oct 2, 2015
1 parent d7faa6a commit 75a2af5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public void run() {
client.write(ByteBuffer.wrap(SOURCE_2));
client.write(ByteBuffer.wrap(SOURCE_3));
client.write(ByteBuffer.wrap(SOURCE_4));
Thread.sleep(1);
}
client.write(ByteBuffer.wrap(CLOSE));
client.close();
Expand All @@ -177,7 +178,7 @@ public void run() {
dumper.kill();
}

// This is a container that counts the callbacks/requests it gets
// This is a container that counts the callbacks/requests it gets and sends a valid HTTP/1.1 response
private class CounterContainer implements Container {

private final AtomicInteger counter;
Expand Down

0 comments on commit 75a2af5

Please sign in to comment.