Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Commit

Permalink
trapping all errors is safer
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Nov 23, 2015
1 parent d41200c commit 07b2bcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/websocket-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ function handle(stream) {
req.deny('database not allowed');
} else {
const channel = req.grant();
channel.once('error', warn);
channel.on('error', warn);
channel.pipe(pouchServer.stream()).pipe(channel);
}
});

stream.once('error', warn);
stream.on('error', warn);
stream.pipe(channelServer).pipe(stream);
}

Expand Down

0 comments on commit 07b2bcc

Please sign in to comment.