Don't hold Context variables for the lifetime of scheduled calls
Fixes #1568
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -21,7 +21,7 @@ public class CarpetContext extends Context
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Context duplicate()
|
public CarpetContext duplicate()
|
||||||
{
|
{
|
||||||
return new CarpetContext(this.host, this.s, this.origin);
|
return new CarpetContext(this.host, this.s, this.origin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public class CarpetEventServer
|
|||||||
{
|
{
|
||||||
// ignoring target as we will be always calling self
|
// ignoring target as we will be always calling self
|
||||||
super(context.host.getName(), null, function, args);
|
super(context.host.getName(), null, function, args);
|
||||||
this.ctx = context;
|
this.ctx = context.duplicate();
|
||||||
this.dueTime = dueTime;
|
this.dueTime = dueTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user