Skip to content

Commit

Permalink
Throttle reader thread
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed May 5, 2021
1 parent fa70be3 commit b182413
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public void run() {
byte[] buffer = new byte[1<<14];
try {
while (true) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
while (from.available() != 0) {
int len = from.read(buffer);
if (len != -1) {
Expand Down

0 comments on commit b182413

Please sign in to comment.