aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/naming/utils/tcp_connect.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/naming/utils/tcp_connect.py')
-rwxr-xr-xtest/cpp/naming/utils/tcp_connect.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/cpp/naming/utils/tcp_connect.py b/test/cpp/naming/utils/tcp_connect.py
index bf7455e3c2..5773c7cae8 100755
--- a/test/cpp/naming/utils/tcp_connect.py
+++ b/test/cpp/naming/utils/tcp_connect.py
@@ -16,8 +16,11 @@
"""Opens a TCP connection to a specified server and then exits."""
import argparse
-import signal
import socket
+import threading
+import time
+import sys
+
def main():
argp = argparse.ArgumentParser(description='Open a TCP handshake to a server')
@@ -28,7 +31,6 @@ def main():
argp.add_argument('-t', '--timeout', default=1, type=int,
help='Force process exit after this number of seconds.')
args = argp.parse_args()
- signal.alarm(args.timeout)
socket.create_connection([args.server_host, args.server_port])
if __name__ == '__main__':