From 67e49cb66ed8b0c18f7047777882197745f6d399 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 24 Oct 2020 23:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dclose=20stream=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9Ecode=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 839df9db..3eb6ef90 100644 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -496,12 +496,12 @@ void installWebApi() { allArgs["vhost"], allArgs["app"], allArgs["stream"]); - if(src){ + if (src) { bool flag = src->close(allArgs["force"].as()); val["result"] = flag ? 0 : -1; val["msg"] = flag ? "success" : "close failed"; - val["code"] = API::OtherFailed; - }else{ + val["code"] = flag ? API::Success : API::OtherFailed; + } else { val["result"] = -2; val["msg"] = "can not find the stream"; val["code"] = API::OtherFailed;