Repository: thrift Updated Branches: refs/heads/master 9815c19d7 -> 4e1ea1101
THRIFT-3179 should not bind to localhost when try to connect This closes #514 Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/4e1ea110 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/4e1ea110 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/4e1ea110 Branch: refs/heads/master Commit: 4e1ea110120121b597b503c02d3f672c7dfb8a90 Parents: 9815c19 Author: zzn <[email protected]> Authored: Thu Jun 4 18:57:20 2015 +0800 Committer: Roger Meier <[email protected]> Committed: Sun Jun 14 22:23:05 2015 +0200 ---------------------------------------------------------------------- lib/lua/src/luasocket.c | 6 ------ 1 file changed, 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/4e1ea110/lib/lua/src/luasocket.c ---------------------------------------------------------------------- diff --git a/lib/lua/src/luasocket.c b/lib/lua/src/luasocket.c index c8a678f..d483510 100644 --- a/lib/lua/src/luasocket.c +++ b/lib/lua/src/luasocket.c @@ -347,11 +347,6 @@ static int l_socket_create_and_connect(lua_State *L) { // Create the socket err = tcp_create(&sock); if (!err) { - // Bind to any port on localhost - err = tcp_bind(&sock, DEFAULT_HOST, 0); - if (err) { - tcp_destroy(&sock); - } else { // Connect err = tcp_connect(&sock, host, port, timeout); if (err) { @@ -365,7 +360,6 @@ static int l_socket_create_and_connect(lua_State *L) { tcp->timeout = timeout; return 1; // Return userdata } - } } } while (err && __gettime() < end);
