We have a design like below and I would like to get opinions or protocol guidlines for the below error scenario.
Layer1
---------------
| ^ ^
| (1) |(4) |(6)
v | | Remote entity
---------------- ---------------
Layer0-----------------(2)------------------------------->Layer0
Layer0<----------------(3)--------------------------------Layer0
Layer0<----------------(5)--------------------------------Layer0
1. New session request to remote entity.
2. Establish link + data(session request)
3. Link Establishment ongoing
4. Link Establishment pending
5. Link Established + data (session accepted)
6. session accepted.
If layer1 decides that it does not need the remote entities service between step 4 and 6. i.e event 4 is received and event 6 is yet to be received due to some error.
1) Should it wait for event 6 to happen and initiate a session release or
2) Layer1 should instruct Layer 0 to terminate the connection establishment procedure
immediately.
Which is the correct way?
The problem with (1) will be, even though we know that we are going to terminate the session because of an error, we need to handle other events before event6 comes in.