JulianFeinauer commented on a change in pull request #170:
URL: https://github.com/apache/plc4x/pull/170#discussion_r452019997



##########
File path: 
plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java
##########
@@ -299,6 +319,14 @@ public void onConnect(ConversationContext<TPKTPacket> 
context) {
         return future;
     }
 
+    /**
+     * This method is only called when there is no Response Handler.
+     */
+    @Override
+    protected void decode(ConversationContext<TPKTPacket> context, TPKTPacket 
msg) throws Exception {
+        throw new IllegalStateException("This should not happen!");

Review comment:
       @chrisdutz yes. BUT the issue is that we want to notify people waiting 
on the response which is another thread which waits for a future.
   One slution would be to have a set of all open futures for this connection 
and cancel all of them if this method is called ("undefined behavior"). I took 
the other way and notify the request / reply pattern when a connection si 
dropped (but nonetheless the paket will then  go there).




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to