From 5b19be6cd2ca7e872509c7b35117809a5f1c444b Mon Sep 17 00:00:00 2001 From: SisMaker <1713699517@qq.com> Date: Thu, 17 Feb 2022 11:34:31 +0800 Subject: [PATCH] =?UTF-8?q?fx:=20=E9=94=99=E8=AF=AF=E7=9A=84=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/lgBkdConsole.erl | 2 ++ src/backend/lgBkdFile.erl | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/lgBkdConsole.erl b/src/backend/lgBkdConsole.erl index ce878bb..b8ab290 100644 --- a/src/backend/lgBkdConsole.erl +++ b/src/backend/lgBkdConsole.erl @@ -85,6 +85,8 @@ handleCall({mSetLogLevel, Level}, State) -> end; handleCall({mRotate, _}, _State) -> {reply, ok}; +handleCall(mRotate, _State) -> + {reply, ok, _State}; handleCall(_Msg, _State) -> ?ERR(<<"~p call receive unexpect msg ~p ~n ">>, [?MODULE, _Msg]), {reply, ok}. diff --git a/src/backend/lgBkdFile.erl b/src/backend/lgBkdFile.erl index c0908f4..e29c135 100644 --- a/src/backend/lgBkdFile.erl +++ b/src/backend/lgBkdFile.erl @@ -116,7 +116,7 @@ handleCall({mSetLogHwm, Hwm}, #state{shaper = Shaper, fBName = FBName} = State) {reply, {lastHwm, Shaper#lgShaper.hwm}, State#state{shaper = NewShaper}} end; handleCall(mRotate, State = #state{fBName = FBName}) -> - {ok, NewState} = handleInfo({mRotate, FBName}, State), + {_, NewState} = handleInfo({mRotate, FBName}, State), {reply, ok, NewState}; handleCall(_Msg, _State) -> ?ERR(<<"~p call receive unexpect msg ~p ~n ">>, [?MODULE, _Msg]), @@ -156,8 +156,8 @@ handleInfo({mRotate, FBName}, #state{fBName = FBName, date = Date} = State) -> NewState = closeFile(State), scheduleRotation(Date, FBName), {noreply, NewState}; -handleInfo({mRotate, _FBName}, _State) -> - kpS; +handleInfo({mRotate, _FBName}, State) -> + {noreply, State}; handleInfo({mShaperExpired, FBName}, #state{shaper = Shaper, fBName = FBName, fmtTer = FmtTer, fmtCfg = FmtCfg} = State) -> case Shaper#lgShaper.dropped of 0 ->