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

The java-client won't reconnect after network problems #11

Open
lovingshu opened this issue Jan 4, 2017 · 0 comments
Open

The java-client won't reconnect after network problems #11

lovingshu opened this issue Jan 4, 2017 · 0 comments

Comments

@lovingshu
Copy link

I had use request method of SSDB as follows: request("set","key","value"),then ,I shut down the network of SSDB Server.And some socket problems occurred,I thought that was not a big problem because I went to restart the network.But it become a big problem because the client won't reconnect,is something wrong while I using it? codes belows:

final SSDB sdb=new SSDB("cent1", 8888);
for(int i=0;i<1000;i++){
new Thread(new Runnable() {
@OverRide
public void run() {
while(true){
try {
String id=UUID.randomUUID().toString();
sdb.request("set",id,id);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}).start();
}

and I also found some exception below:
java.lang.Exception: Parse body_len error
at com.udpwork.ssdb.Link.parse(Link.java:136)
at com.udpwork.ssdb.Link.recv(Link.java:85)
at com.udpwork.ssdb.Link.request(Link.java:71)
at com.udpwork.ssdb.Link.request(Link.java:51)
at com.udpwork.ssdb.SSDB.request(SSDB.java:36)

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

1 participant