You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2019/09/06 14:14:38 UTC

[GitHub] [knox] risdenk commented on a change in pull request #143: KNOX-1997: Adding changes to buffer messages from backend in onMessag…

risdenk commented on a change in pull request #143: KNOX-1997: Adding changes to buffer messages from backend in onMessag…
URL: https://github.com/apache/knox/pull/143#discussion_r321754997
 
 

 ##########
 File path: gateway-server/src/main/java/org/apache/knox/gateway/websockets/ProxyWebSocketAdapter.java
 ##########
 @@ -198,12 +232,29 @@ public void onError(Throwable cause) {
 
       @Override
       public void onMessageText(String message, Object session) {
+        LOG.logMessage("[From Backend <---]" + message);
+        remoteLock.lock();
         final RemoteEndpoint remote = getRemote();
 
 Review comment:
   So I don't know this code, but it seems weird to me that getRemote returns null at all. It looks like the remote null check is fixing the symptom not the root cause. Is it possible to make getRemote block and never return null? I think that would avoid having to buffer messages at all?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services