Skip to content

Commit

Permalink
Update master
Browse files Browse the repository at this point in the history
  • Loading branch information
semu committed Jun 25, 2012
1 parent dbc13a8 commit c4eb177
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/xmpp/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,11 @@ Connection.prototype.send = function(stanza) {
if (stanza.root) {
var el = this.rmXmlns(stanza.root());
this.socket.serializeStanza(el, function(s) {
if (self.socket.writable) {
flushed = self.socket.write(s);
}
if (self.socket.writable) {
self.socket.write(s);
} else {
self.error('internal-server-error', 'socket not writable');
}
});
} else {
flushed = this.socket.write(stanza);
Expand Down

0 comments on commit c4eb177

Please sign in to comment.