diff options
| author | Adam Soltys <[email protected]> | 2014-08-19 09:26:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2014-08-19 09:26:25 -0700 |
| commit | 1e24fe8d3d87104a7d70b4be286dc82003e48912 (patch) | |
| tree | e6a92ee4d7110c3342fe3015d3f2186beef13664 /app.js | |
| parent | 722825386a47c85190013b1aa47050bdaae61077 (diff) | |
| download | coinos-server-1e24fe8d3d87104a7d70b4be286dc82003e48912.tar.gz coinos-server-1e24fe8d3d87104a7d70b4be286dc82003e48912.zip | |
Use blockchain socket too for redundancy
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -92,9 +92,12 @@ var r, stream; stream = fs.createWriteStream(file); r = request("https://api.bitcoinaverage.com/exchanges/all"); - return r.on('data', function(chunk) { + r.on('data', function(chunk) { return stream.write(chunk); }); + return r.on('error', function(error) { + return console.log(error); + }); }); return setTimeout(fetchRates, 120000); }; |
