Commit 982d5e4e authored by Matheus Jardim Bernardes's avatar Matheus Jardim Bernardes Committed by GitHub

Merge pull request #332 from RocketChat/fix/bump-rpc-timeout

Bumped timeout from 4000 to 20000 ms as it seems a more reasonable
parents 841593bc 5ea3a3d5
......@@ -36,7 +36,7 @@ import hugo.weaving.DebugLog;
*/
public class MethodCallHelper {
protected static final long TIMEOUT_MS = 4000;
protected static final long TIMEOUT_MS = 20000;
protected static final Continuation<String, Task<JSONObject>> CONVERT_TO_JSON_OBJECT =
task -> Task.forResult(new JSONObject(task.getResult()));
protected static final Continuation<String, Task<JSONArray>> CONVERT_TO_JSON_ARRAY =
......
......@@ -72,6 +72,11 @@ public class NewMessageObserver extends AbstractModelObserver<RealmMessage> {
realm.createOrUpdateObjectFromJson(RealmMessage.class, new JSONObject()
.put(RealmMessage.ID, messageId)
.put(RealmMessage.SYNC_STATE, SyncState.FAILED)));
} else {
realmHelper.executeTransaction(realm ->
realm.createOrUpdateObjectFromJson(RealmMessage.class, new JSONObject()
.put(RealmMessage.ID, messageId)
.put(RealmMessage.SYNC_STATE, SyncState.SYNCED)));
}
return null;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment