Skip to content

Commit

Permalink
I've been binding the stub instead of the object itself, which may ha…
Browse files Browse the repository at this point in the history
…ve been causing the sketch runner to exit early.
  • Loading branch information
Jonathan Feinberg committed Mar 17, 2019
1 parent 0806403 commit a592bbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/src/jycessing/mode/run/RMIUtils.java
Expand Up @@ -83,13 +83,13 @@ public static void bind(final Remote remote, final Class<? extends Remote> remot
throws RMIProblem {
final String registryKey = remoteInterface.getSimpleName();
try {
final Remote stub = export(remote);
export(remote);
log(
"Attempting to bind instance of "
+ remote.getClass().getName()
+ " to registry as "
+ registryKey);
registry().bind(registryKey, stub);
registry().bind(registryKey, remote);
log("Bound.");
Runtime.getRuntime()
.addShutdownHook(
Expand Down
2 changes: 2 additions & 0 deletions runtime/src/jycessing/mode/run/SketchRunner.java
Expand Up @@ -160,8 +160,10 @@ public static void main(final String[] args) {
// If env var SKETCH_RUNNER_FIRST=true then SketchRunner will wait for a ping from the Mode
// before registering itself as the sketch runner.
if (PythonMode.SKETCH_RUNNER_FIRST) {
log("Waiting for mode with id " + id);
waitForMode(id);
} else {
log("Starting sketch runner immediately with id " + id);
startSketchRunner(id);
}
}
Expand Down

0 comments on commit a592bbe

Please sign in to comment.