diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-04-15 11:50:05 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-04-15 11:50:05 +0800 |
commit | 54f298ffed628139650b7ce0b63e8d6c0bc4097d (patch) | |
tree | 8d41bc395daf045c0fe482d429d644abf9476e71 | |
parent | 4ad5096f94d808e6a25adf24256dc9d2b9e8f202 (diff) | |
download | pttbbs-54f298ffed628139650b7ce0b63e8d6c0bc4097d.tar pttbbs-54f298ffed628139650b7ce0b63e8d6c0bc4097d.tar.gz pttbbs-54f298ffed628139650b7ce0b63e8d6c0bc4097d.tar.bz2 pttbbs-54f298ffed628139650b7ce0b63e8d6c0bc4097d.tar.lz pttbbs-54f298ffed628139650b7ce0b63e8d6c0bc4097d.tar.xz pttbbs-54f298ffed628139650b7ce0b63e8d6c0bc4097d.tar.zst pttbbs-54f298ffed628139650b7ce0b63e8d6c0bc4097d.zip |
Improve remote BRC failure message - correct time, and reduce retry timeout.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5656 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/brc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/brc.c b/pttbbs/mbbsd/brc.c index e4801f81..dac68964 100644 --- a/pttbbs/mbbsd/brc.c +++ b/pttbbs/mbbsd/brc.c @@ -273,9 +273,9 @@ brc_update(){ } #ifdef LOG_REMOTE_BRC_FAILURE -# define BRC_FAILURE(msg) { log_filef("log/brc_remote_failure.log", \ - LOG_CREAT, "%s %s ERR: %s", \ - Cdate(&now), msg, command); break; } +# define BRC_FAILURE(msg) { syncnow(); \ + log_filef("log/brc_remote_failure.log", LOG_CREAT, "%s %s ERR: %s", \ + Cdate(&now), msg, command); break; } #else # define BRC_FAILURE(msg) { break; } #endif @@ -297,7 +297,7 @@ load_remote_brc() { do { int conn_retries = 10; while (conn_retries-- > 0 && - (fd = toconnectex(BRCSTORED_ADDR, 10)) < 0) { + (fd = toconnectex(BRCSTORED_ADDR, 5)) < 0) { mvprints(b_lines, 0, (conn_retries == 0) ? "無法載入最新的看板已讀未讀資料, 將使用上次備份... (#%d)" : "正在同步看板已讀未讀資料,請稍候... (#%d)", conn_retries + 1); |