1 parent a8fc397 commit 695adeeCopy full SHA for 695adee
2 files changed
src/main/java/nl/kingdev/graphqlclient/Client.java
@@ -219,6 +219,9 @@ public void closeClient() {
219
this.websocketClient.close();
220
}
221
this.httpUtil.close();
222
+ if(this.resultCache != null) {
223
+ this.resultCache.close();
224
+ }
225
226
227
public String getUri() {
src/main/java/nl/kingdev/graphqlclient/util/Cache.java
@@ -19,6 +19,7 @@ public void run() {
19
}, 0, 60000);
20
21
22
+
23
private static class CacheObject<T> {
24
protected T object;
25
protected long ttl;
@@ -69,4 +70,9 @@ public T get(String key) {
69
70
return null;
71
72
73
74
75
+ public void close() {
76
+ this.timer.cancel();
77
78
0 commit comments