Skip to content

Commit

Permalink
Increased timeout of socket connection
Browse files Browse the repository at this point in the history
Upgraded feathers client package
  • Loading branch information
aminlatifi committed Apr 5, 2022
1 parent bbfb3ea commit fc2845b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 107 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@feathersjs/authentication-client": "^4.5.11",
"@feathersjs/feathers": "^4.5.11",
"@feathersjs/rest-client": "^4.5.11",
"@feathersjs/socketio-client": "^4.5.11",
"@giveth/bridge-contract": "^1.0.6",
"@giveth/liquidpledging-contract": "^2.0.0-beta.6",
"@giveth/lpp-campaign": "^2.0.0-beta.1",
Expand All @@ -23,7 +24,6 @@
"bnc-onboard": "^1.29.0",
"feathers-hooks-common": "^5.0.5",
"feathers-reactive": "^0.8.2",
"feathers-socketio": "^2.0.1",
"file-saver": "^2.0.5",
"history": "^4.9.0",
"jwt-decode": "^3.1.2",
Expand Down
11 changes: 7 additions & 4 deletions src/lib/feathersClient.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import localforage from 'localforage';
import rx from 'feathers-reactive';
import socketio from 'feathers-socketio/client';
import socketio from '@feathersjs/socketio-client';
import * as Sentry from '@sentry/react';
import config from '../configuration';

Expand Down Expand Up @@ -28,6 +28,9 @@ socket.on('connect_error', e => {
console.log('send Feathers connection error to sentry');
}
});
socket.on('disconnect', _e => {
console.log('Could not connect to FeatherJS: Disconnect');
});
socket.on('connect_timeout', _e => {
console.log('Could not connect to FeatherJS: Timeout');
});
Expand All @@ -45,9 +48,9 @@ export const feathersRest = feathers()
export const feathersClient = feathers()
.configure(
socketio(socket, {
timeout: 30000,
pingTimeout: 30000,
upgradeTimeout: 30000,
timeout: 90000,
pingTimeout: 90000,
upgradeTimeout: 90000,
}),
)
.configure(auth({ storage: localforage }))
Expand Down
143 changes: 41 additions & 102 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2204,13 +2204,25 @@
resolved "https://registry.yarnpkg.com/@feathersjs/commons/-/commons-4.5.11.tgz#4c9d04e6996b823981b714312f7915c4469f0ffd"
integrity sha512-it/9lc0OER36+2zidopWo6Z4xRqNImQ+qegyQdHEuIDpEsYLXAv6MVHuDccaW2x2UmW5pce75UB7DhQ8yh8J/Q==

"@feathersjs/commons@^4.5.12":
version "4.5.12"
resolved "https://registry.yarnpkg.com/@feathersjs/commons/-/commons-4.5.12.tgz#42e60e933849905b8803a3ebd7d4424f85ee7d3f"
integrity sha512-ss3yyk8HurmOCSD+wvENIrT9iSa8vg9SmikoP5c9JaLkbtMmKpH88jCjgRl7jiO54f2+UcjW3PqccNgUGSNSDQ==

"@feathersjs/errors@^4.5.11":
version "4.5.11"
resolved "https://registry.yarnpkg.com/@feathersjs/errors/-/errors-4.5.11.tgz#419b4dd9b557fe7a87978363175cbd5e06f8b3b9"
integrity sha512-KzkUqmaV7/SGK6SM/ILXjMI/EHOGKQE4GgDHCsB4+mcIwb8IZboeHL6IkYjh6MvwjKNDyS728McZvcflDGn/fA==
dependencies:
debug "^4.3.1"

"@feathersjs/errors@^4.5.12":
version "4.5.12"
resolved "https://registry.yarnpkg.com/@feathersjs/errors/-/errors-4.5.12.tgz#c9d408a103e2ead228e6c61ea24516e6fe635a43"
integrity sha512-xIQJ7t/acTuL1fTC6mpf0qlcWfJkA9x0rRMrSgjD3mzUnJU6VqxXFxusL8895ksGD0vQHwPueblbm8Hn6Ifqqw==
dependencies:
debug "^4.3.3"

"@feathersjs/feathers@^4.5.11", "@feathersjs/feathers@^4.5.3":
version "4.5.11"
resolved "https://registry.yarnpkg.com/@feathersjs/feathers/-/feathers-4.5.11.tgz#98999fe3857896bd15a676d4660dd92fe22481c4"
Expand All @@ -2230,6 +2242,14 @@
"@feathersjs/errors" "^4.5.11"
qs "^6.9.4"

"@feathersjs/socketio-client@^4.5.11":
version "4.5.13"
resolved "https://registry.yarnpkg.com/@feathersjs/socketio-client/-/socketio-client-4.5.13.tgz#bf2c013fa1a4743f3d3a66c18569e18b7bc254fd"
integrity sha512-WPjBNR6+tiIwsPyO89s+HrasIPqouNNALR8MENYLZzRaKo+najMjVwLVMzVUgJ6Ztxs/WmPTs17Hbjv5iY11jA==
dependencies:
"@feathersjs/transport-commons" "^4.5.12"
"@types/socket.io-client" "^1.4.36"

"@feathersjs/transport-commons@^4.5.11":
version "4.5.11"
resolved "https://registry.yarnpkg.com/@feathersjs/transport-commons/-/transport-commons-4.5.11.tgz#dfb31ecd1e66eb80cc6fab77b41d62e46b0a844b"
Expand All @@ -2241,6 +2261,17 @@
lodash "^4.17.20"
radix-router "^3.0.1"

"@feathersjs/transport-commons@^4.5.12":
version "4.5.12"
resolved "https://registry.yarnpkg.com/@feathersjs/transport-commons/-/transport-commons-4.5.12.tgz#3993d03a1cfed630b0fc42e5dc1e92c76738fb28"
integrity sha512-c/FnP+xzCmfsHGj4NGhHpTy2haaA2jiKZ+du8rUUWBgxC73y3mw7udUGhWdDxGx2mnXtOKCwIA6oPQBdXtFC+A==
dependencies:
"@feathersjs/commons" "^4.5.12"
"@feathersjs/errors" "^4.5.12"
debug "^4.3.3"
lodash "^4.17.21"
radix-router "^3.0.1"

"@giveth/bridge-contract@^1.0.6":
version "1.0.6"
resolved "https://registry.yarnpkg.com/@giveth/bridge-contract/-/bridge-contract-1.0.6.tgz#66abf797ef4ca63be13293658e2b4f8b7357c486"
Expand Down Expand Up @@ -3407,12 +3438,10 @@
dependencies:
"@types/node" "*"

"@types/socket.io@~1.4.27":
version "1.4.42"
resolved "https://registry.yarnpkg.com/@types/socket.io/-/socket.io-1.4.42.tgz#cd2750542d95db888e161b88c85d38162f21fbbb"
integrity sha512-2SnWce3DiBVkswhJgpo4FSoMTAAHksxYOFXaBZe4icrrrvpXee8yUPOZT77xzWvLZw63QpREUHHWzM4lQpHjtA==
dependencies:
"@types/node" "*"
"@types/socket.io-client@^1.4.36":
version "1.4.36"
resolved "https://registry.yarnpkg.com/@types/socket.io-client/-/socket.io-client-1.4.36.tgz#e4f1ca065f84c20939e9850e70222202bd76ff3f"
integrity sha512-ZJWjtFBeBy1kRSYpVbeGYTElf6BqPQUkXDlHHD4k/42byCN5Rh027f4yARHCink9sKAkbtGZXEAmR0ZCnc2/Ag==

"@types/source-list-map@*":
version "0.1.2"
Expand Down Expand Up @@ -5227,11 +5256,6 @@ base64-js@^1.0.2, base64-js@^1.3.1:
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==

base64id@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6"
integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==

base@^0.11.1:
version "0.11.2"
resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
Expand Down Expand Up @@ -6355,11 +6379,6 @@ component-bind@1.0.0:
resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1"
integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=

component-emitter@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=

component-emitter@^1.2.0, component-emitter@^1.2.1, component-emitter@~1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
Expand Down Expand Up @@ -6493,11 +6512,6 @@ cookie@0.4.0:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==

cookie@~0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"
integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==

cookiejar@^2.1.0, cookiejar@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c"
Expand Down Expand Up @@ -7020,19 +7034,19 @@ debug@=3.1.0, debug@~3.1.0:
dependencies:
ms "2.0.0"

debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6, debug@^3.2.7:
debug@^3.1.0, debug@^3.1.1, debug@^3.2.6, debug@^3.2.7:
version "3.2.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
dependencies:
ms "^2.1.1"

debug@~4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
debug@^4.3.3:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
dependencies:
ms "^2.1.1"
ms "2.1.2"

decamelize-keys@^1.0.0:
version "1.1.0"
Expand Down Expand Up @@ -7579,18 +7593,6 @@ engine.io-parser@~2.2.0:
blob "0.0.5"
has-binary2 "~1.0.2"

engine.io@~3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.5.0.tgz#9d6b985c8a39b1fe87cd91eb014de0552259821b"
integrity sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==
dependencies:
accepts "~1.3.4"
base64id "2.0.0"
cookie "~0.4.1"
debug "~4.1.0"
engine.io-parser "~2.2.0"
ws "~7.4.2"

enhanced-resolve@^4.3.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec"
Expand Down Expand Up @@ -8839,18 +8841,6 @@ fb-watchman@^2.0.0:
dependencies:
bser "2.1.1"

feathers-commons@^0.8.0:
version "0.8.7"
resolved "https://registry.yarnpkg.com/feathers-commons/-/feathers-commons-0.8.7.tgz#11c6f25b537745a983e8d61552d7db8932d53782"
integrity sha1-EcbyW1N3RamD6NYVUtfbiTLVN4I=

feathers-errors@^2.2.0:
version "2.9.2"
resolved "https://registry.yarnpkg.com/feathers-errors/-/feathers-errors-2.9.2.tgz#96ca0e5fe50cc56f0eccc90ce3fa5e1f8840828d"
integrity sha512-qwIX97bNW7+1tWVG073+omUA0rCYKJtTtwuzTrrvfrtdr8J8Dk1Fy4iaV9Fa6/YBD5AZu0lsplPE0iu4u/d4GQ==
dependencies:
debug "^3.0.0"

feathers-hooks-common@^5.0.5:
version "5.0.6"
resolved "https://registry.yarnpkg.com/feathers-hooks-common/-/feathers-hooks-common-5.0.6.tgz#eac65521d44c306c838f14c9f1f6deb785ac0b35"
Expand Down Expand Up @@ -8881,26 +8871,6 @@ feathers-reactive@^0.8.2:
rxjs "^6.5.5"
sift "^12.0.1"

feathers-socket-commons@^2.0.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/feathers-socket-commons/-/feathers-socket-commons-2.4.0.tgz#062efd57f9a8716644145b993a5f72709969f1e1"
integrity sha1-Bi79V/mocWZEFFuZOl9ycJlp8eE=
dependencies:
debug "^2.2.0"
feathers-commons "^0.8.0"
feathers-errors "^2.2.0"

feathers-socketio@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/feathers-socketio/-/feathers-socketio-2.0.1.tgz#7efa089c33569a3b09d09d6c077a5f6c257f4a52"
integrity sha512-3ByXVr6UGyGN6TPRN+U5IhENYrSgeuADhbKWLG5cq2WvYH9h2N1l3cj7WBVsfRektUgVw/HkGNAoExy8yuknMA==
dependencies:
"@types/socket.io" "~1.4.27"
debug "^3.0.0"
feathers-socket-commons "^2.0.0"
socket.io "^2.0.1"
uberproto "^1.2.0"

fetch-ponyfill@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893"
Expand Down Expand Up @@ -16702,11 +16672,6 @@ snapdragon@^0.8.1:
source-map-resolve "^0.5.0"
use "^3.1.0"

socket.io-adapter@~1.1.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9"
integrity sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==

socket.io-client@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.4.0.tgz#aafb5d594a3c55a34355562fc8aea22ed9119a35"
Expand All @@ -16733,27 +16698,6 @@ socket.io-parser@~3.3.0:
debug "~3.1.0"
isarray "2.0.1"

socket.io-parser@~3.4.0:
version "3.4.1"
resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.4.1.tgz#b06af838302975837eab2dc980037da24054d64a"
integrity sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==
dependencies:
component-emitter "1.2.1"
debug "~4.1.0"
isarray "2.0.1"

socket.io@^2.0.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.4.1.tgz#95ad861c9a52369d7f1a68acf0d4a1b16da451d2"
integrity sha512-Si18v0mMXGAqLqCVpTxBa8MGqriHGQh8ccEOhmsmNS3thNCGBwO8WGrwMibANsWtQQ5NStdZwHqZR3naJVFc3w==
dependencies:
debug "~4.1.0"
engine.io "~3.5.0"
has-binary2 "~1.0.2"
socket.io-adapter "~1.1.0"
socket.io-client "2.4.0"
socket.io-parser "~3.4.0"

sockjs-client@^1.5.0:
version "1.5.1"
resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.1.tgz#256908f6d5adfb94dabbdbd02c66362cca0f9ea6"
Expand Down Expand Up @@ -17994,11 +17938,6 @@ u2f-api@0.2.7:
resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720"
integrity sha512-fqLNg8vpvLOD5J/z4B6wpPg4Lvowz1nJ9xdHcCzdUPKcFE/qNCceV2gNZxSJd5vhAZemHr/K/hbzVA0zxB5mkg==

uberproto@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/uberproto/-/uberproto-1.2.0.tgz#61d4eab024f909c4e6ea52be867c4894a4beeb76"
integrity sha1-YdTqsCT5CcTm6lK+hnxIlKS+63Y=

uberproto@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/uberproto/-/uberproto-2.0.6.tgz#709274d183bce6fb734dfd3880d2086ed72b69e5"
Expand Down

0 comments on commit fc2845b

Please sign in to comment.