minieap icon indicating copy to clipboard operation
minieap copied to clipboard

no-auto-reauth 配置项的逻辑判断有问题

Open moeray opened this issue 6 years ago • 4 comments

当配置文件中不存在"no-auto-reauth"时程序才能正常掉线重新认证.反之无论no-auto-reauth=0还是no-auto-reauth=1,程序都会掉线后自动退出

moeray avatar Apr 24 '19 07:04 moeray

https://github.com/updateing/minieap/blob/bf4f1b4fec68621365301d6b2f61361319372ff3/config.c#L149-L150 应该是这里的问题

ysc3839 avatar Apr 25 '19 09:04 ysc3839

设计上这个参数确实就是不带值的,只要有就生效。

config.c:

        "\t--stage-timeout, -t <num>\t单个认证阶段的超时时间 [默认" STR(DEFAULT_STAGE_TIMEOUT) "]\n"
        "\t--wait-after-fail, -r <num>\t认证失败后重新认证前的等待时间(但当服务器要求重新认证时将直接开始认证)[默认" STR(DEFAULT_WAIT_AFTER_FAIL_SECS) "]\n"
        "\t--max-fail, -l <num>\t最大允许认证失败次数 [默认" STR(DEFAULT_MAX_FAILURES) "]\n"
        "\t--no-auto-reauth, -x\t认证掉线后不允许自动重连 [默认" STR(DEFAULT_RESTART_ON_LOGOFF) "]\n"
        "\t--daemonize, -b <0-3>\t后台运行方式: [默认0]\n"

updateing avatar Apr 26 '19 13:04 updateing

@updateing 但是生成配置文件时是有的。 https://github.com/updateing/minieap/blob/bf4f1b4fec68621365301d6b2f61361319372ff3/config.c#L263

ysc3839 avatar Apr 26 '19 14:04 ysc3839

这是一个复制粘贴没过脑子的例子…… 现在这样也只能靠 =0 时加个判断来挽救了😂

updateing avatar Apr 26 '19 15:04 updateing