THRIFT-3179 should not bind to localhost when try to connect
This closes #514
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 @@
// 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 @@
tcp->timeout = timeout;
return 1; // Return userdata
}
- }
}
} while (err && __gettime() < end);