Skip to content

Commit

Permalink
RPC: reject invalid responses without altering conn status
Browse files Browse the repository at this point in the history
  • Loading branch information
whphhg committed May 26, 2017
1 parent d72e246 commit cfd19b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vcash-electron",
"productName": "Vcash Electron GUI",
"version": "0.31.5",
"version": "0.31.6",
"description": "Multi-platform and multi-node GUI for Vcash.",
"main": "src/electron.js",
"scripts": {
Expand Down Expand Up @@ -69,13 +69,13 @@
"devDependencies": {
"babel-core": "6.24.1",
"babel-eslint": "7.2.3",
"babel-plugin-import": "1.1.1",
"babel-plugin-import": "1.2.0",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"babel-runtime": "6.23.0",
"electron-builder": "17.10.0",
"electron-builder": "18.0.1",
"electron-prebuilt-compile": "1.7.0",
"standard": "10.0.2"
}
Expand Down
5 changes: 4 additions & 1 deletion src/stores/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export default class RPC {
return callback(data, options)
})
.catch((error) => {
console.error('RPC:', error.message)
console.error('RPC:', options, error.message)

/** Reject invalid responses, but don't alter connection status. */
if (error.message.indexOf('Unexpected token') !== -1) return

/** Update connection status. */
if (
Expand Down

0 comments on commit cfd19b0

Please sign in to comment.