Closed johje349 closed 7 years ago
I have a client created in the following way:
private ManagerService initManagerThriftClient() { ManagerService thriftClient = null; try { HttpClientConnector connector = new HttpClientConnector(URI.create("http://xxxxxx:8080/thriftservice")); ThriftClientManager clientManager = new ThriftClientManager(new ThriftCodecManager()); thriftClient = clientManager.createClient(connector, ManagerService.class).get(); } catch (Exception e) { e.printStackTrace(); } return thriftClient; }
I then call remote methods, e.g: managerThriftClient.userLogin(username, password, ipAddress);
The problem is after a while I get a Channel Closed exception: org.apache.thrift.transport.TTransportException: Channel closed
I cannot seem to find a way to set keeaplive or timeouts on the connection. Any ideas how to solve this?
I have a client created in the following way:
I then call remote methods, e.g: managerThriftClient.userLogin(username, password, ipAddress);
The problem is after a while I get a Channel Closed exception: org.apache.thrift.transport.TTransportException: Channel closed
I cannot seem to find a way to set keeaplive or timeouts on the connection. Any ideas how to solve this?