[BXXPwg] Closing a Channel
Michael van Acken
23 Nov 2000 10:20:38 +0100
I'm pondering the actions that should be taken when a BEEP peer issues
or accepts a "close" request. My problem is, that a "close" message
is not synchronized in any way with the message traffic on the channel
For example, assume peer A sends a "close" message for channel 123 to
peer B. Peer B gives its "ok" on channel 0, just after passing a
message X for channel 123 to the transport layer. Because messages on
different channels (0 and 123 in this example) are not synchronized
and can be delivered in any order, the "ok" from peer B may arrive
_before_ message X. This means, peer A may close the channel 123 on
its side _before_ X arrives on this channel. Then, because X's
channel number does not refer to an existing channel, the session is
terminated upon its arrival because of a poorly-formed frame.
Is this example valid?
More general, when a BEEP peer requests to close a channel, there may
be incomplete messages currently being send on the channel, messages
queued for sending, and outstanding replies to previous requests. How
should they be handled?
-- Michael van Acken