File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
src/main/java/com/iexec/core/worker Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file.
3131- Remove duplicated MongoDB read on ` ReplicatesList ` during replicate status update. (#647 )
3232- Use less MongoDB calls when updating a task to a final status. (#649 )
3333- Save contribution and result updload replicate data when ` CONTRIBUTE_AND_FINALIZE_DONE ` . (#651 )
34+ - Fix potential ` NullPointerException ` during first worker replicate request. (#652 )
3435
3536### Dependency Upgrades
3637
Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ public boolean isAllowedToJoin(String workerAddress) {
121121 }
122122
123123 public boolean isWorkerAllowedToAskReplicate (String walletAddress ) {
124- Date lastReplicateDemandDate = workerStatsMap .get (walletAddress ).getLastReplicateDemandDate ();
124+ Date lastReplicateDemandDate = workerStatsMap .computeIfAbsent (walletAddress , WorkerStats ::new )
125+ .getLastReplicateDemandDate ();
125126 if (lastReplicateDemandDate == null ) {
126127 return true ;
127128 }
You can’t perform that action at this time.
0 commit comments