Comparing version 2.0.0 to 2.0.1
@@ -280,2 +280,3 @@ var raf = require('random-access-file') | ||
var json = JSON.stringify(header) | ||
debug('[SERIALIZE] header outgoing: ' + json) | ||
var lenBuf = Buffer.alloc(4) | ||
@@ -292,3 +293,5 @@ lenBuf.writeUInt32LE(json.length, 0) | ||
var len = buf.readUInt32LE(0) | ||
var jsonBuf = buf.slice(4) | ||
debug('[SERIALIZE] header len to read: ' + len) | ||
var jsonBuf = buf.slice(4, len + 4) | ||
debug('[SERIALIZE] json buf to read: ' + jsonBuf.toString()) | ||
try { | ||
@@ -295,0 +298,0 @@ var header = JSON.parse(jsonBuf.toString('utf8')) |
@@ -5,3 +5,3 @@ { | ||
"author": "Stephen Whitmore <sww@eight.net>", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "url": "git://github.com/noffle/multifeed.git" |
24041
634