Permalink
Browse files

vfs-http-transport: Improve error handling and bump version to 0.0.2

  • Loading branch information...
1 parent 9d06341 commit 8bddcf39886f843add79abff85eeda39680ad17f @creationix creationix committed Jul 12, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 http-transport/package.json
  2. +4 −4 http-transport/server.js
@@ -1,6 +1,6 @@
{
"name": "vfs-http-transport",
- "version": "0.0.1",
+ "version": "0.0.2",
"author": "Tim Caswell",
"dependencies": {
"vfs-socket": "~0.1.7",
View
@@ -13,10 +13,10 @@ function setup(vfs, server, namespace) {
// Wrap the local vfs in a worker. We will serve it over http using the
// websocket channel.
var worker = new Worker(vfs);
- worker.connect(new WebSocketTransport(client), function (err) {
- if (err) {
- throw err;
- }
+ worker.connect(new WebSocketTransport(client));
+ worker.on("error", function (err) {
+ if (err && err.stack) console.error(err.stack);
+ client.terminate();
});
});
};

0 comments on commit 8bddcf3

Please sign in to comment.