[Pkg-javascript-commits] [ltx] 33/469: connection.send(): stop if not writable
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:00:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository ltx.
commit b8ec0d5af0c9bbf15fb35cdfe9a52913ce0c03db
Author: Astro <astro at spaceboyz.net>
Date: Tue Jun 1 02:36:36 2010 +0200
connection.send(): stop if not writable
---
lib/xmpp/connection.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/xmpp/connection.js b/lib/xmpp/connection.js
index c30fe09..bf46d7d 100644
--- a/lib/xmpp/connection.js
+++ b/lib/xmpp/connection.js
@@ -25,6 +25,11 @@ sys.inherits(Connection, net.Stream);
exports.Connection = Connection;
Connection.prototype.send = function(stanza) {
+ if (!this.writable) {
+ this.end();
+ return;
+ }
+
if (stanza.root) {
var el = this.rmStreamNs(stanza.root());
var self = this;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git
More information about the Pkg-javascript-commits
mailing list