eventscripts: Tweak the timeout check in kill_tcp_connections()
authorMartin Schwenke <martin@meltin.net>
Tue, 30 Apr 2013 01:39:46 +0000 (11:39 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 6 May 2013 06:22:15 +0000 (16:22 +1000)
commit60a08eb96e1d97aab31e9bd4af01683c650541c2
treefd23bbe45f99610bc862fdc9de69baf27a5d6f08
parent319c1b68d5aa78f82a68febcad233a7c78afc887
eventscripts: Tweak the timeout check in kill_tcp_connections()

This has 2 advantages:

1. It uses get_tcp_connections_for_ip() to check for leftover
   connections, instead of custom code.

2. It checks for the timeout condition before sleeping.  The current
   code sleeps and then checks, so wastes a second.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions