From 531cc7b86489d920183e3f0811e31da3070204ae Mon Sep 17 00:00:00 2001 From: John Guo Date: Mon, 7 Mar 2022 09:57:51 +0800 Subject: [PATCH] fix issue in package gproc --- net/ghttp/ghttp_server.go | 2 +- os/gproc/gproc_comm.go | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/net/ghttp/ghttp_server.go b/net/ghttp/ghttp_server.go index a731b31e6..0961cba70 100644 --- a/net/ghttp/ghttp_server.go +++ b/net/ghttp/ghttp_server.go @@ -128,7 +128,7 @@ func (s *Server) Start() error { swaggerui.Init() s.AddStaticPath(s.config.SwaggerPath, swaggerUIPackedPath) s.BindHookHandler(s.config.SwaggerPath+"/*", HookBeforeServe, s.swaggerUI) - s.Logger().Debugf( + s.Logger().Infof( ctx, `swagger ui is serving at address: %s%s/`, s.getListenAddress(), diff --git a/os/gproc/gproc_comm.go b/os/gproc/gproc_comm.go index 546142a16..b547d31d7 100644 --- a/os/gproc/gproc_comm.go +++ b/os/gproc/gproc_comm.go @@ -107,10 +107,12 @@ func getCommPidFolderPath() (folderPath string, err error) { break } } - err = gerror.Newf( - `cannot find available folder for storing pid to port mapping files in paths: %+v`, - availablePaths, - ) + if commPidFolderPath == "" { + err = gerror.Newf( + `cannot find available folder for storing pid to port mapping files in paths: %+v`, + availablePaths, + ) + } }) folderPath = commPidFolderPath return