Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 34 by [email protected]: Session based Client Ro
throws Null Pointer Exceptions if send fails in HA mode in
getGatheredRequestedAction()
http://code.google.com/p/jdiameter/issues/detail?id=34
What steps will reproduce the problem?
1. Configure stack in HA mode
2. Send a session based Ro CCR which fails (no server listening)
3. getGatheredRequestedAction() throws an NPE
4. If this is fixed, dispatch() throws an NPE because the session has been
discarded before dispatch() is called.
What is the expected output? What do you see instead?
Requested Action is mandatory for Events, but is not required for session
based messages.
handleSendFailure() calls getGatheredRequestedAction() before deciding if
the message is an Event or session based. This is fine in non-HA mode, but
in HA it causes an NPE (as there is no Requested Action
setGatheredRequestedAction() has not been called)
What version of the product are you using? On what operating system?
1.5.0 SNAPSHOT from git on CentOS 6.3.
Please provide any additional information below.
The solution to the first issue is simply to only call
getGatheredRequestedAction() once we have decided that we have an Event.
The second issue can be avoided by not removing the session when we go
IDLE, however I believe this may cause us to leak sessions; the remove
should be called a some point.
Attached is git diff showing my solutions. This probably needs a call to
remove the session at some point. I'll look at that next week.
Attachments:
ClientRoSessionImpl.diff 2.3 KB