This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
Compoment
/
MQTTnet
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
gently close the connection before leaving the page
release/3.x.x
Jan Eggers
7 years ago
parent
e80d21e852
commit
0e0fcabc04
1 changed files
with
5 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-1
Tests/MQTTnet.TestApp.AspNetCore2/wwwroot/app/app.ts
+ 5
- 1
Tests/MQTTnet.TestApp.AspNetCore2/wwwroot/app/app.ts
View File
@@ -13,4 +13,8 @@ client.on('connect', () => {
client.on('message', (topic, message) => {
// message is Buffer
console.log(message.toString());
})
});
window.onbeforeunload = () => {
client.end();
};
Write
Preview
Loading…
Cancel
Save