Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiver thread(PDUReaderWorker) can stop without any log or recovery when some invalid packet is received via the session. #1

Open
sinihong opened this issue Mar 25, 2015 · 0 comments

Comments

@sinihong
Copy link
Member

It is totally abnormal case, but when some invalid packet is received by receiver(PDUReaderWorker), it could just stop without closing session and even leaving any log, because 'IndexOutOfBoundsException' could occur in reading the invalid packet but it catches only three checked exceptions. (InvalidCommandLengthException, SocketTimeoutException and IOException).

For example, if 0x0000 is received by the receiver, DefautPDUReader will throw 'IndexOutOfBoundException' in 'readPDUHeader' because the packet has just incorrect message length value. And as a result, the receiver will just stop without handling or logging it.
In the case, no reconnect will be triggered and enquire link will remain locked until another error occurs for sending message and reconnect is triggered.

PDUReaderWorker will need to catch unchecked exceptions too, so that it can gracefully close the session for reconnect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant