Files
test_server/reproduce_crash.sh
T
2026-04-09 22:31:31 +03:00

40 lines
859 B
Bash
Executable File

#!/bin/bash
# Script to test TCP connect/disconnect functionality
BASE_URL="http://127.0.0.1:8888"
echo "=== Test 1: Connect to TCP server ==="
echo "GET /api/connect"
curl -s "$BASE_URL/api/connect"
echo ""
echo ""
echo "=== Test 2: Attempt reconnect (already connected) ==="
echo "GET /api/connect"
curl -s "$BASE_URL/api/connect"
echo ""
echo ""
echo "=== Test 3: Disconnect from TCP server ==="
echo "GET /api/disconnect"
curl -s "$BASE_URL/api/disconnect"
echo ""
echo ""
echo "=== Test 4: Attempt disconnect (already disconnected) ==="
echo "GET /api/disconnect"
curl -s "$BASE_URL/api/disconnect"
echo ""
echo ""
echo "=== Test 5: Reconnect after disconnect ==="
echo "GET /api/connect"
curl -s "$BASE_URL/api/connect"
echo ""
echo ""
echo "=== Test 6: Final disconnect ==="
echo "GET /api/disconnect"
curl -s "$BASE_URL/api/disconnect"
echo ""