marsevilspirit commented on code in PR #2852:
URL: https://github.com/apache/dubbo-go/pull/2852#discussion_r2065196600
##########
protocol/triple/triple_protocol/server.go:
##########
@@ -171,13 +172,20 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r
*http.Request) {
}
func (s *Server) Run() error {
- // todo(DMwangnima): deal with TLS
s.httpSrv.Handler = h2c.NewHandler(s, &http2.Server{})
- if err := s.httpSrv.ListenAndServe(); err != nil {
- return err
+ var err error
+ if s.httpSrv.TLSConfig != nil {
+ // TODO: Maybe we should be able to find a better way to start
TLS.
+ err = s.httpSrv.ListenAndServeTLS("", "")
+ } else {
+ err = s.httpSrv.ListenAndServe()
}
- return nil
+ return err
+}
+
+func (s *Server) SetTLSConfig(c *tls.Config) {
Review Comment:
httpsrv小写开头 go中无法暴露出去
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]