You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2015/12/08 20:11:42 UTC
[1/2] thrift git commit: THRIFT-3328 A callback is not called when a
server is down.
Repository: thrift
Updated Branches:
refs/heads/master 8644617f7 -> 3143bfbe1
THRIFT-3328 A callback is not called when a server is down.
https://issues.apache.org/jira/browse/THRIFT-3328
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/84cf363e
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/84cf363e
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/84cf363e
Branch: refs/heads/master
Commit: 84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b
Parents: 8644617
Author: HIRANO Satoshi <ha...@gmail.com>
Authored: Mon Dec 7 17:17:15 2015 +0900
Committer: Roger Meier <ro...@bufferoverflow.ch>
Committed: Mon Dec 7 23:14:13 2015 +0100
----------------------------------------------------------------------
lib/js/src/thrift.js | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/84cf363e/lib/js/src/thrift.js
----------------------------------------------------------------------
diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js
index 664171e..34be450 100644
--- a/lib/js/src/thrift.js
+++ b/lib/js/src/thrift.js
@@ -343,6 +343,16 @@ Thrift.TXHRTransport.prototype = {
}
};
}());
+
+ // detect net::ERR_CONNECTION_REFUSED and call the callback.
+ xreq.onerror =
+ (function() {
+ var clientCallback = callback;
+ return function() {
+ clientCallback();
+ };
+ }());
+
}
xreq.open('POST', this.url, !!async);
[2/2] thrift git commit: THRIFT-3478 restore method to THsHaServer
Posted by ro...@apache.org.
THRIFT-3478 restore method to THsHaServer
This closes #735
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/3143bfbe
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/3143bfbe
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/3143bfbe
Branch: refs/heads/master
Commit: 3143bfbe15b42c758aa627ef402b21cbb1245851
Parents: 84cf363
Author: Keith Turner <kt...@apache.org>
Authored: Tue Dec 8 11:14:01 2015 -0500
Committer: Roger Meier <ro...@bufferoverflow.ch>
Committed: Tue Dec 8 20:11:20 2015 +0100
----------------------------------------------------------------------
.../org/apache/thrift/server/THsHaServer.java | 22 ++++++++++++++++++++
1 file changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/3143bfbe/lib/java/src/org/apache/thrift/server/THsHaServer.java
----------------------------------------------------------------------
diff --git a/lib/java/src/org/apache/thrift/server/THsHaServer.java b/lib/java/src/org/apache/thrift/server/THsHaServer.java
index 2ef4b83..2414e49 100644
--- a/lib/java/src/org/apache/thrift/server/THsHaServer.java
+++ b/lib/java/src/org/apache/thrift/server/THsHaServer.java
@@ -45,6 +45,28 @@ public class THsHaServer extends TNonblockingServer {
super(transport);
}
+
+ /**
+ * Sets the min and max threads.
+ *
+ * @deprecated use {@link #minWorkerThreads(int)} and {@link #maxWorkerThreads(int)} instead.
+ */
+ @Deprecated
+ public Args workerThreads(int n) {
+ minWorkerThreads = n;
+ maxWorkerThreads = n;
+ return this;
+ }
+
+ /**
+ * @return what the min threads was set to.
+ * @deprecated use {@link #getMinWorkerThreads()} and {@link #getMaxWorkerThreads()} instead.
+ */
+ @Deprecated
+ public int getWorkerThreads() {
+ return minWorkerThreads;
+ }
+
public Args minWorkerThreads(int n) {
minWorkerThreads = n;
return this;