You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "oliviercoma (via GitHub)" <gi...@apache.org> on 2024/10/24 09:38:38 UTC

Re: [I] [Bug]: modbus over serial port(com) could not closed successfully.

oliviercoma commented on issue #1610:
URL: https://github.com/apache/plc4x/issues/1610#issuecomment-2434786585

   We're also impacted by this issue.
   I wanted to work on a fix, but the SerialChannel implementation seems really hacky without much information / comments and thus really difficult to work on:
   - Why close method from AbstractChannel.AbstractUnsafe is overriden and completely by-passed as it deals with the specific issue (variable closeInitiated)
   - Why unsafe() returns a new instance each time (a new instance is recreated at each read). Other implementations do not do that and only newUnsafe() is overriden. As newUnsafe() is not overriden, there is a rogue NioByteUnsafe that lies around.
   - Why SerialNioUnsafe.read() implementation is very similar (but a bit different) to the one from NioByteUnsafe. Why is it not overriden?


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org