Github user ptgoetz commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/103#discussion_r12398727
--- Diff: storm-core/src/jvm/backtype/storm/messaging/netty/Client.java ---
@@ -84,43 +93,87 @@
// Start the connection attempt.
remote_addr = new InetSocketAddress(host, port);
- bootstrap.connect(remote_addr);
+
+ Thread flushChecker = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ //make sure we have a connection
+ connect();
+
+ while(!closing) {
+ long flushCheckTime = flushCheckTimer.get();
+ long now = System.currentTimeMillis();
+ if (now > flushCheckTime) {
+ Channel channel = channelRef.get();
+ if (null != channel && channel.isWritable()) {
+ flush();
+ }
+ }
+ try {
+ Thread.sleep(flushCheckInterval);
+ } catch (InterruptedException e) {
+ break;
+ }
+ }
+
+ }
+ });
+
+ flushChecker.setDaemon(true);
--- End diff --
Do we want to name this thread as well?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---