0x3a WS handshake error

#1

Hi,

After some time (hours or days) I get this error in the log:

11:06:12.162 -> 2020-11-08 10:34:17 E ws.c:117:mg_ws_cb 0x3d WS handshake error: HTTP/1.1 401 Un
11:06:14.553 -> 2020-11-08 10:34:19 E ws.c:117:mg_ws_cb 0x3e WS handshake error: HTTP/1.1 401 Un
11:06:16.991 -> 2020-11-08 10:34:22 E ws.c:117:mg_ws_cb 0x3f WS handshake error: HTTP/1.1 401 Un
11:06:19.321 -> 2020-11-08 10:34:24 E ws.c:117:mg_ws_cb 0x37 WS handshake error: HTTP/1.1 401 Un
11:06:19.833 -> mdash state 2
11:06:21.744 -> 2020-11-08 10:34:27 E ws.c:117:mg_ws_cb 0x3a WS handshake error: HTTP/1.1 401 Un
11:06:24.208 -> 2020-11-08 10:34:29 E ws.c:117:mg_ws_cb 0x3b WS handshake error: HTTP/1.1 401 Un
11:06:26.614 -> 2020-11-08 10:34:31 E ws.c:117:mg_ws_cb 0x3c WS handshake error: HTTP/1.1 401 Un
11:06:29.087 -> 2020-11-08 10:34:34 E ws.c:117:mg_ws_cb 0x3d WS handshake error: HTTP/1.1 401 Un
11:06:29.970 -> mdash state 2

mdash_state=2 equals to MDASH_EVENT_NETWORK_CONNECTED

How do I force the ESP32 to reconnect/reset its connection to mdash.net?

Regards
Morten

#2

I noticed the ws close just before the errors started:
21:21:33.157 -> 2020-11-09 20:55:17 E ws.c:141:mg_ws_cb 0x37 Got WS CLOSE
21:21:35.530 -> 2020-11-09 20:55:19 E ws.c:117:mg_ws_cb 0x3a WS handshake error: HTTP/1.1 400 Ba
21:21:37.997 -> 2020-11-09 20:55:22 E ws.c:117:mg_ws_cb 0x3b WS handshake error: HTTP/1.1 400 Ba