Update check_tcp.c

Return the state asked for, if connection failed.