# Logout Process

**URL:** <https://forum.fixtrading.org/t/logout-process/17077>\
**Category:** General Q&A\
**Created:** [May 4, 2023, 12:32pm UTC](https://forum.fixtrading.org/t/logout-process/17077 "2023-05-04T12:32:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hedvidaero](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hedvidaero](https://forum.fixtrading.org/u/hedvidaero)\
**Post date:** [May 4, 2023, 12:32pm UTC](https://forum.fixtrading.org/t/logout-process/17077/1 "2023-05-04T12:32:46Z")

</div>

Hello,

I want to learn possible differences and process for two logout case.

1- Client can logout with his own request from current session. In this case client sends logout message(MsgType=5) to exchange and waits a while for answer. After answer is received (again MsgType=5) the session ends. But what to do if client doesn’t get a response after sending the logout request? Should send logout message again ? Or terminate connection ?

2- When middle of the trading session, client can exceed own message quota. So exchange should force client to logout. Should exchange send a logout message and wait for answer ? Or after sended logout message, can terminate session without get response ?

Thanks for help.

---

<div class="post-metadata">

**Author:** ![christophjohn](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.fixtrading.org/christophjohn/32/689_2.png) [@christophjohn](https://forum.fixtrading.org/u/christophjohn)\
**Post date:** [May 4, 2023, 1:15pm UTC](https://forum.fixtrading.org/t/logout-process/17077/2 "2023-05-04T13:15:49Z")

</div>

Usually one should wait for a sensible timeout (e.g. 2 seconds) before terminating the connection after no Logout response has been received.

> The Logout(35=5) initiator should terminate the FIX connection if the peer does not respond within a reasonable time frame. Twice the value specified in the HeartBtInt(108) field of the Logon(35=A) message is recommended.

From [https://www.fixtrading.org/standards/fix-session-layer-online/#fix-connection-termination](https://www.fixtrading.org/standards/fix-session-layer-online/#fix-connection-termination)

However, twice the Heartbeat interval sounds very long to me…

---

<div class="post-metadata">

**Author:** ![hedvidaero](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hedvidaero](https://forum.fixtrading.org/u/hedvidaero)\
**Post date:** [May 4, 2023, 1:53pm UTC](https://forum.fixtrading.org/t/logout-process/17077/3 "2023-05-04T13:53:05Z")

</div>

Thanks for your answer. Twice of HB time is negotiable, i agree with you. Beside it i want to summarize your answer:

It’s not important if client’s request or if exchange force client. After send logout message, wait for response X sec(maybe twice HB), later terminate session. (Next step of this scenario if client sends other messages instead of logout, reject all of them. This solution seems logically)
