Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一直报错说没有设置setReadStrategy #67

Open
niebiao opened this issue May 26, 2018 · 2 comments
Open

一直报错说没有设置setReadStrategy #67

niebiao opened this issue May 26, 2018 · 2 comments

Comments

@niebiao
Copy link

niebiao commented May 26, 2018

logcat日志一直显示我没有设置读取的规则,但是我已经设置为AutoReadToTrailer,希望有人可以帮我解答一下,谢谢

ava.lang.NullPointerException: Attempt to invoke virtual method 'com.vilyever.socketclient.helper.SocketPacketHelper$ReadStrategy com.vilyever.socketclient.helper.SocketPacketHelper.getReadStrategy()' on a null object reference
at com.vilyever.socketclient.SocketClient$ReceiveThread.run(SocketClient.java:1211)

@niebiao
Copy link
Author

niebiao commented Jun 4, 2018

if (self.getSocketPacketHelper().getReadStrategy() == SocketPacketHelper.ReadStrategy.Manually) {
return;
}
直接获取getSocketPacketHelper就可以了,就不会出现问题

@WangIdea
Copy link

我也遇到了这个问题 ,而且是今天突然就报错了, 之前一直没有错误,是什么原因呢。
ava.lang.NullPointerException: Attempt to invoke virtual method 'com.vilyever.socketclient.helper.SocketPacketHelper$ReadStrategy com.vilyever.socketclient.helper.SocketPacketHelper.getReadStrategy()' on a null object reference
at com.vilyever.socketclient.SocketClient$ReceiveThread.run(SocketClient.java:1211)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants