Permalink
Browse files

Don't mask exceptions in writeToSocket(); let the server catch them s…

…o it can retry messages.
  • Loading branch information...
1 parent 26cee48 commit ecd7a4859ee51683e5a110fa11144480cf5566a3 @jcoglan jcoglan committed Jan 3, 2011
Showing with 3 additions and 8 deletions.
  1. +3 −8 javascript/util/node/web_socket.js
@@ -164,14 +164,9 @@ Faye.extend(Faye.WebSocket, {
};
var writeToSocket = function(socket, message) {
- try {
- socket.write(FRAME_START, 'binary');
- socket.write(message, 'utf8');
- socket.write(FRAME_END, 'binary');
- } catch (e) {
- // socket closed while writing
- // server will keep message and retry when a new socket is open
- }
+ socket.write(FRAME_START, 'binary');
+ socket.write(message, 'utf8');
+ socket.write(FRAME_END, 'binary');
};
var FRAME_START = byteToChar('00'),

0 comments on commit ecd7a48

Please sign in to comment.