Skip to content

Can I invoke discardRequest() in JxioSessionClosedException's handler? #23

@lynus

Description

@lynus

According to JXIO API doc for ServerSession.sendResponse():

org.accelio.jxio.exceptions.JxioSessionClosedException - if session already closed. In case exception is thrown, discardRequest must be called for this message after SESSION_CLOSED event is officially recieved.

Does it mean that the message that failed to send due to this exception can only be discarded in onSessionEvent()?
My problem is, in my program, ServerSession might closes before another thread calls sendResponse(), which means discardRequest() might has no chance to be called in onSessionEvent().
Can I just discardRequest(msg) in JxioSessionClosedException handler?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions