englercj / node-esl

FreeSWITCH ESL implementation for Node.js; implements the full Event Socket Library specified in: http://wiki.freeswitch.org/wiki/Esl
http://englercj.github.com/node-esl/
MIT License
170 stars 111 forks source link

Issue #84 -- emit esl::end on socket::close #86

Open ssinyagin opened 4 years ago

ssinyagin commented 4 years ago

net.Socket emits "end" only on successful closing, but it emits "close" in error conditions as well.

englercj commented 4 years ago

Thanks for tracking this down. Looks like this breaks one of the tests, can you look into why that is please?

ssinyagin commented 4 years ago

seems like you're expecting connection::close while the socket is still alive. With my patch, the close event comes when the socket is done.

englercj commented 4 years ago

Makes sense, I'm happy to merge this once the tests are passing.