Files
ocserv/tests/sleep-connect-script
Nikos Mavrogiannopoulos 7e00f4247a test-script-multi-user: Fix timeout: move sleep 600 inside connect branch
The sleep-connect-script blocked on both connect and disconnect invocations.
When the server shuts down, two disconnect scripts race past the test -f
check simultaneously and both sleep 600s, exceeding the test timeout.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-03-20 20:47:35 +01:00

15 lines
148 B
Bash
Executable File

#!/bin/sh
case "$REASON" in
connect)
if ! test -f test-sleep.tmp;then
touch test-sleep.tmp
sleep 600
fi
;;
disconnect)
;;
esac
exit 0