You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2023/06/20 02:21:36 UTC
[eventmesh-go] 30/33: fix http listen error,before port add ":"
This is an automated email from the ASF dual-hosted git repository.
chenguangsheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/eventmesh-go.git
commit 3a23ce1f0416e6d186a22bed761b07794b21607b
Author: wangwenjun <wa...@thorough.ai>
AuthorDate: Wed Jun 7 17:41:37 2023 +0800
fix http listen error,before port add ":"
---
runtime/emserver/http.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/runtime/emserver/http.go b/runtime/emserver/http.go
index 4a64dda..da060be 100644
--- a/runtime/emserver/http.go
+++ b/runtime/emserver/http.go
@@ -54,7 +54,11 @@ func (h *HTTPServer) Serve() error {
return err
}
}
- return h.router.Run(h.httpOption.Port)
+ addr := ""
+ if len(h.httpOption.Port) != 0 {
+ addr = ":" + h.httpOption.Port
+ }
+ return h.router.Run(addr)
}
func (h *HTTPServer) Stop() error {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org