kiwiirc / irc-framework

🛠️ A better IRC framework for node.js. For bots and full clients.
MIT License
181 stars 64 forks source link

Fire write() callback when not connected, add extra debug #234

Closed xPaw closed 4 years ago

xPaw commented 4 years ago

connection.end relies on the callback, and it may not be called in some cases.

I'm also thinking that socket.write itself may not fire it when socket is hanging.

See https://github.com/thelounge/thelounge/issues/3697

prawnsalad commented 4 years ago

The additions to transports/net.js should also be added to transports/websocket.js and then this PR look good to me.