We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40ad723 commit ff67a38Copy full SHA for ff67a38
1 file changed
README.md
@@ -108,6 +108,19 @@
108
mvn test
109
110
## 使用样例
111
+如果使用 NettyHttpClient(v3.2.15 版本新增),需要在响应返回后手动调用一下 NettyHttpClient 中的 close 方法,否则进程不会退出。代码示例:
112
+```
113
+...
114
+try {
115
+ PushResult result = jpushClient.sendPush(payload);
116
+ LOG.info("Got result - " + result);
117
+ Thread.sleep(5000);
118
+ // 定义一个 close 方法,最终调用 NettyHttpClient 中的 close 方法即可。
119
+ jpushClient.close();
120
+} catch(InterruptedException e) {
121
+ e.printStackTrace();
122
+}
123
124
125
### 推送样例
126
@@ -122,7 +135,7 @@
135
try {
136
PushResult result = jpushClient.sendPush(payload);
137
LOG.info("Got result - " + result);
-
138
+
139
} catch (APIConnectionException e) {
127
140
// Connection error, should retry later
128
141
LOG.error("Connection error, should retry later", e);
0 commit comments