# Best practice to avoid lost socket connection

**URL:** <https://forum.heroiclabs.com/t/best-practice-to-avoid-lost-socket-connection/2562>\
**Category:** Game Design\
**Tags:** getting-started, authentication, sdk-unity\
**Created:** [April 26, 2022, 6:40pm UTC](https://forum.heroiclabs.com/t/best-practice-to-avoid-lost-socket-connection/2562 "2022-04-26T18:40:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![solidsnakeit](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@solidsnakeit](https://forum.heroiclabs.com/u/solidsnakeit)\
**Post date:** [April 26, 2022, 6:40pm UTC](https://forum.heroiclabs.com/t/best-practice-to-avoid-lost-socket-connection/2562/1 "2022-04-26T18:40:31Z")

</div>

Hi everyone,  
I have looked at tutorials, tried to understand example codes and searched on this forum but I didn’t find a clear list of best practices to follow to keep the connection with the Namaka server robust and efficient.

Let me explain: in all the tutorials a simple code is shown; no exception handling, no example of connection checking and reconnection attempt.

Please note that we develop for mobile devices = unstable connection.

Before inventing things that already exist, can someone please list the points of attention and a code example for a good and correct connection management with Namaka?

thanks, I hope I was clear
