Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void keepTrying(final Bootstrap b) {
- b.connect().addListener(new ChannelFutureListener() {
- @Override
- public void operationComplete(ChannelFuture cf) throws Exception {
- if(cf.isSuccess()) {
- System.out.println("Connected successfully");
- } else {
- Thread.sleep(10*1000);
- System.out.println("connection attempt failed, econnecting");
- b.connect().addListener(this);
- }
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement