Skip to content

Conversation

@eladnava
Copy link
Contributor

Also, handle dropped connections (to avoid memory leak)

Also, handle dropped connections (to avoid memory leak)
@mcollina
Copy link
Member

mcollina commented Jun 8, 2015

@eladnava can you please format the code following the general conventions of the rest of the repo?

Thanks for you contribution!

@eladnava
Copy link
Contributor Author

eladnava commented Jun 8, 2015

I will, however, I noticed that in mosca, this is taken care of automatically. I no longer have a memory leak due to clients that have passively disconnected. How were you able to overcome that in mosca?

@eladnava
Copy link
Contributor Author

eladnava commented Jun 8, 2015

I think that event is called only on active disconnection (client sending a disconnect packet) and not for connections that have been terminated by 3rd parties (e.g. routers)

Is there any other code that specifically handles the passive disconnection case?

@mcollina
Copy link
Member

mcollina commented Jun 8, 2015

that event is called in any case.

@eladnava
Copy link
Contributor Author

I ended up simply migrating to mosca, as it's actually meant to be a MQTT broker (I noticed that you don't recommend using mqtt-connection for serverside usage, only as a POC).

@eladnava eladnava closed this Dec 17, 2015
@eladnava eladnava deleted the readme-server-example branch December 17, 2015 22:37
@eladnava eladnava restored the readme-server-example branch December 17, 2015 22:37
@eladnava
Copy link
Contributor Author

eladnava commented Oct 3, 2016

@mcollina I'd like to take another shot at this (improving the server example in README), adding the relevant event handlers. Can I submit another PR?

@mcollina
Copy link
Member

mcollina commented Oct 3, 2016

Please do! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants