# Websocket getting disconnected without disconnection callback

**URL:** <https://forum.heroiclabs.com/t/websocket-getting-disconnected-without-disconnection-callback/217>\
**Category:** Local Setup\
**Created:** [September 19, 2019, 6:39pm UTC](https://forum.heroiclabs.com/t/websocket-getting-disconnected-without-disconnection-callback/217 "2019-09-19T18:39:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bfops](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/bfops/32/73_2.png) [@bfops](https://forum.heroiclabs.com/u/bfops)\
**Post date:** [September 19, 2019, 6:39pm UTC](https://forum.heroiclabs.com/t/websocket-getting-disconnected-without-disconnection-callback/217/1 "2019-09-19T18:39:43Z")

</div>

I’m using nakama in a mobile app and I’m seeing that occasionally some devices seem to lose their websocket connection (e.g. they don’t get notifications) but not their internet connection (they can communicate with other servers) but they **don’t** get a websocket disconnection callback. It doesn’t seem to be a waiting game either, it seems indefinite once it’s started.

I’ve resorted to forcibly disconnecting and reconnecting the socket when things seem strangely silent but I’m wondering if maybe there’s some gotcha I should know about?

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [September 20, 2019, 7:40am UTC](https://forum.heroiclabs.com/t/websocket-getting-disconnected-without-disconnection-callback/217/2 "2019-09-20T07:40:13Z")

</div>

Hi @bfops. I need a lot more information to help understand what disconnects you see with your game project:

- What client sdk do you use? What version is it?
- What version of the server do you use? Have you changed any of the [socket settings](https://heroiclabs.com/docs/install-configuration/#socket)?
- Which OS are you testing your game on with mobile? Android, or iOS?
- If you’re using Unity engine, what version is it?

---

<div class="post-metadata">

**Author:** ![bfops](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/bfops/32/73_2.png) [@bfops](https://forum.heroiclabs.com/u/bfops)\
**Post date:** [September 20, 2019, 5:18pm UTC](https://forum.heroiclabs.com/t/websocket-getting-disconnected-without-disconnection-callback/217/3 "2019-09-20T17:18:15Z")

</div>

Thanks @novabyte!

- Client version is 2.1.1.0 or 2.1.0+Branch.master.Sha.06b88199e23.
- Server version says “2.0.0+dev” in the log - we forked off nakama master at 2b926c6a to make some matchmaker changes
- We haven’t changed any of the socket settings from their defaults.
- We’ve seen this on Android and iOS
- Unity 2018.3.10f1

I’m mainly wondering if a phrase like “websockets silently disconnected without callback” jogs any memories of known bugs/gotchas. If not then this sounds like a nasty repro to narrow down.

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [September 21, 2019, 9:24am UTC](https://forum.heroiclabs.com/t/websocket-getting-disconnected-without-disconnection-callback/217/4 "2019-09-21T09:24:34Z")

</div>

> Server version says “2.0.0+dev” in the log - we forked off nakama master at 2b926c6a to make some matchmaker changes

What matchmaker changes did you make?
