Compare commits

...

2 Commits
0.3.4 ... 0.3.6

Author SHA1 Message Date
Guillermo Rauch
7f5228abc3 Fixed syntax error -.- 2010-05-28 06:12:31 -03:00
Guillermo Rauch
0ad237ddf5 Fix for stream not writable problems 2010-05-28 05:28:25 -03:00

View File

@@ -55,9 +55,13 @@ this.websocket = Client.extend({
},
_write: function(message){
this.connection.write('\u0000', 'binary');
this.connection.write(message, 'utf8');
this.connection.write('\uffff', 'binary');
try {
this.connection.write('\u0000', 'binary');
this.connection.write(message, 'utf8');
this.connection.write('\uffff', 'binary');
} catch(e){
this._onClose();
}
}
});