In master branch, the join method is called on the function and not the thread.
tcp_server_loop_thread = threading.Thread(target=tcp_server_loop)
tcp_server_loop_thread.start()
# Running the node until the application is terminated or until first error.
try:
node.spin()
except KeyboardInterrupt:
tcp_server_loop.join()
if connection:
connection.close()