更新证书后设备连接断开,但是emqx没有发出来离线消息

我们发现一个现象:

  1. 在emqx上更换证书后,设备会掉线。这个符合预期的。
  2. 但是此时设备离线,不会发出离线消息到系统topic:${clientid}/disconnected

大家有没有遇到类似的情况?
这种情况是系统本身的行为就是这样的,还是我们使用的姿势不对。

emqx 版本是多少,是什么证书? EMQX 许可证?

emqx版本:V5.3.1, 开源版
证书是私有根证书签署的如下:

生成私有根证书

openssl genrsa -out pri-root.key 1024
openssl req -new -out pri-root.csr -key pri-root.key
openssl x509 -req -in pri-root.csr -out pri-root.crt -signkey pri-root.key -CAcreateserial -days 3650

生成服务器证书并有私有根证书签名

openssl genrsa -out 101.key 1024
openssl req -new -out 101.csr -key 101.key
openssl x509 -req -in 101.csr -out 101.crt -signkey 101.key -CA pri-root.crt -CAkey pri-root.key -CAcreateserial -days 3650

再生成一份

openssl genrsa -out new101.key 1024
openssl req -new -out new101.csr -key new101.key
openssl x509 -req -in new101.csr -out new101.crt -signkey new101.key -CA pri-root.crt -CAkey pri-root.key -CAcreateserial -days 3650

实验时提到的更换这个证书就是用101证书和new101证书来回切换。

正常更新 ssl 证书,是不会把旧链接断开的。有完整的 debug 信息么。