Skip to content

Commit

Permalink
fix: MRestContext#setStaticResourcesCacheEnabled方法增加锁控制及Server状态检查
Browse files Browse the repository at this point in the history
  • Loading branch information
jiashunx committed Jan 11, 2024
1 parent 04ca105 commit 2029810
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,8 @@ public Supplier<ObjectMapper> getObjectMapperSupplier() {
*/
private volatile long autoRefreshStaticResourcesPeriod = DEFAULT_REFRESH_PERIOD;

public MRestContext setStaticResourcesCacheEnabled(boolean staticResourcesCacheEnabled) {
public synchronized MRestContext setStaticResourcesCacheEnabled(boolean staticResourcesCacheEnabled) {
restServer.checkServerState();
this.staticResourcesCacheEnabled = staticResourcesCacheEnabled;
return this;
}
Expand Down

0 comments on commit 2029810

Please sign in to comment.