Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 8bddcf39886f843add79abff85eeda39680ad17f 1 parent 9d06341
@creationix creationix authored
Showing with 5 additions and 5 deletions.
  1. +1 −1  http-transport/package.json
  2. +4 −4 http-transport/server.js
View
2  http-transport/package.json
@@ -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
8 http-transport/server.js
@@ -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();
});
});
};
Please sign in to comment.
Something went wrong with that request. Please try again.