Skip to content

Commit cd64b5e

Browse files
authored
fix (#449)
1 parent f76a0ff commit cd64b5e

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/UserGuide/Master/Tree/API/Programming-Java-Native-API.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,9 @@ for (int i = 0; i < 8; ++i) {
773773
.buildPushConsumer()) {
774774
consumer2.open();
775775
consumer2.subscribe(TOPIC_2);
776-
} catch (final IOException e) {
776+
// block the consumer main thread
777+
Thread.sleep(Long.MAX_VALUE);
778+
} catch (final IOException | InterruptedException e) {
777779
throw new RuntimeException(e);
778780
}
779781
});

src/UserGuide/latest/API/Programming-Java-Native-API.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,9 @@ for (int i = 0; i < 8; ++i) {
773773
.buildPushConsumer()) {
774774
consumer2.open();
775775
consumer2.subscribe(TOPIC_2);
776-
} catch (final IOException e) {
776+
// block the consumer main thread
777+
Thread.sleep(Long.MAX_VALUE);
778+
} catch (final IOException | InterruptedException e) {
777779
throw new RuntimeException(e);
778780
}
779781
});

src/zh/UserGuide/Master/Tree/API/Programming-Java-Native-API.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,9 @@ for (int i = 0; i < 8; ++i) {
726726
.buildPushConsumer()) {
727727
consumer2.open();
728728
consumer2.subscribe(TOPIC_2);
729-
} catch (final IOException e) {
729+
// block the consumer main thread
730+
Thread.sleep(Long.MAX_VALUE);
731+
} catch (final IOException | InterruptedException e) {
730732
throw new RuntimeException(e);
731733
}
732734
});

src/zh/UserGuide/latest/API/Programming-Java-Native-API.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,9 @@ for (int i = 0; i < 8; ++i) {
725725
.buildPushConsumer()) {
726726
consumer2.open();
727727
consumer2.subscribe(TOPIC_2);
728-
} catch (final IOException e) {
728+
// block the consumer main thread
729+
Thread.sleep(Long.MAX_VALUE);
730+
} catch (final IOException | InterruptedException e) {
729731
throw new RuntimeException(e);
730732
}
731733
});

0 commit comments

Comments
 (0)