Skip to content

Commit

Permalink
Temporary fix when stuck waiting for deny link list
Browse files Browse the repository at this point in the history
- Bump version to v0.5.2
  • Loading branch information
AmirAbrams committed Jun 17, 2019
1 parent 450e86d commit c2772e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pshare",
"version": "0.5.1",
"version": "0.5.2",
"description": "Secure and private peer to peer file sharing",
"license": "UNLICENSED",
"author": {
Expand Down
12 changes: 6 additions & 6 deletions src/main/sagas/bdapSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ export function* bdapSaga(rpcClient: RpcClient, mock: boolean = false) {
yield takeEvery(getType(BdapActions.initialize), function* () {
let allSourcesRetrievedAtLeastOnce = false
for (; ;) {

/** TODO: Add a timer here so it doesn't get stuck in an infinate loop */

yield put(BdapActions.getUsers())

yield put(BdapActions.getCompleteLinks())
yield put(BdapActions.getPendingAcceptLinks())
yield put(BdapActions.getPendingRequestLinks())
yield put(BdapActions.getDeniedLinks())
/** yield put(BdapActions.getDeniedLinks()) */

const getResults = yield all({
users: race({
Expand All @@ -118,19 +118,19 @@ export function* bdapSaga(rpcClient: RpcClient, mock: boolean = false) {
pendingAccept: race({
success: take(getType(BdapActions.getPendingAcceptLinksSuccess)),
failure: take(getType(BdapActions.getPendingAcceptLinksFailed))
}),
denied: race({
})/**,
denied: race({
success: take(getType(BdapActions.getDeniedLinksSuccess)),
failure: take(getType(BdapActions.getDeniedLinksFailed))
})
})*/
})

if (getResults.users.success
&& getResults.completeLinks.success
&& getResults.pendingRequest.success
&& getResults.pendingAccept.success
&& getResults.denied.success
/** && getResults.denied.success */
) {
console.log("all user/link data successful retrieved")

Expand Down

0 comments on commit c2772e0

Please sign in to comment.