implement auto-kill if no network traffic is taking place
fix autokill in some cases where the state is in wait_close state