+1 vote

Sharing from my experience to help others:

I'm using secure websocket (wss://), and I experienced repeating disconnections few minutes after the connection was established, with the client dumping

mbedtls error: returned -0x6c00

and the server dumping

Websocket get data error: 18, read (should be 0!): 0
Websocket (wslay) poll error: -400

After researching, I discovered that it happened due to my website being behind a CDN.
I solved it by doing the following:
In the CDN, I configured the DNS so that www.example.com is proxied but example.com is DNS-only.
Then, I made sure that all http:// page requests are being redirected from http{s}://example.com to https://www.example.com (by writing a condition in htaccess file on the server).
In my client, I made sure the websocket url is wss://example.com.
And that's it, no more disconnections.

Godot version 3.2.3
in Engine by (130 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.