finefuture commented on code in PR #14077:
URL: https://github.com/apache/dubbo/pull/14077#discussion_r1604729212


##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleHttp2Protocol.java:
##########
@@ -204,10 +205,9 @@ private Http2FrameCodec buildHttp2FrameCodec(URL url) {
     }
 
     private TripleConfig getTripleConfig(URL url) {
-        return url.getOrDefaultApplicationModel()
-                .getApplicationConfigManager()
-                .getProtocol(url.getProtocol())
-                .orElseThrow(() -> new IllegalStateException("There's no 
ProtocolConfig specified."))
-                .getTriple();
+        return 
url.getOrDefaultApplicationModel().getApplicationConfigManager().getDefaultProtocols().stream()

Review Comment:
   Updated:
   ```java
       private TripleConfig getTripleConfig(URL url) {
           return url.getOrDefaultApplicationModel()
                   .getApplicationConfigManager()
                   .getOrAddProtocol(url.getProtocol())
                   .getTriple();
       }
   ```



-- 
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]

Reply via email to