The inactivity timeout fires after 3 hours. It is important to eventually close inactive connections to avoid "collecting" broken connections.
If you want to disable it then you can use a timer that sends a request every few minutes. You can for example get the value of one of the elements. Don't forget to call ws.Flush.
I find another issue for websocket thread which is not active for a long time. Session will also time out, and I have to set MaxInactiveInterval long enough .