使用java获取allMiniTickerStreams报错

connectionId = client.allMiniTickerStream(
(open → {
log.error(“开始连接,获取websocket数据!,:{}”, open);
}),
(events → {
saveSymbol(events);
}),
(close → {
log.error(“连接关闭,获取websocket数据!,:{}”, close);
}),
(failure → {
log.error(“发生错误,错误描述:{}”, failure);
client.closeConnection(connectionId);
})
);



java.io.EOFException: null
at okio.RealBufferedSource.require(RealBufferedSource.java:65)
at okio.RealBufferedSource.readByte(RealBufferedSource.java:78)
at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:117)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:101)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:273)
at okhttp3.internal.ws.RealWebSocket$1.onResponse(RealWebSocket.java:209)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Please take a look at the following link to see an example: