1
私はいくつかのオートバンコードを持っています。私はonopenイベントとoncloseイベントの両方を含むテストを行っています。私は更新によって気付いていたが、私のコードが実行され続けるので、接続が失われていると思った。私は、あたりとして存在するOnCloseのイベントを更新:autobahn oncloseイベントに再接続
connection.onclose = (reason, details) => {
console.log("REASON", reason);
console.log("DETAILS", details);
reject(reason);
process.exit();
};
の接続が失われたとき、私は今取得:
REASON lost
DETAILS { reason: null,
message: null,
retry_delay: 1.3305311206405022,
retry_count: 1,
will_retry: true }
私は、このイベントに応答し、接続を再確立したりしできとにかくあり私の "process.exit()"行は自動的にこれを止めますか?