Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow subclasses to override exit correctly #28

Merged
merged 1 commit into from

2 participants

@rnewson

Prior to 28d3dd1 subclasses of Service and Process could override exit(reason : Any) to cleanup stateful resources. This patch restores that ability.

It might be neater to have an onExit(reason : Any) variant, with a no-op implementation in the base class to guard against overriding this function without calling the superclass.

@rnewson

bump

@moonpolysoft moonpolysoft merged commit 8716b73 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 26, 2012
  1. @rnewson
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/scala/scalang/node/ProcessAdapter.scala
View
6 src/main/scala/scalang/node/ProcessAdapter.scala
@@ -42,7 +42,7 @@ abstract class ProcessHolder(ctx : ProcessContext) extends ProcessAdapter {
} catch {
case e : Throwable =>
log.error(e, "An error occurred in actor %s", process)
- exit(e.getMessage)
+ process.exit(e.getMessage)
}
}
}
@@ -56,7 +56,7 @@ abstract class ProcessHolder(ctx : ProcessContext) extends ProcessAdapter {
} catch {
case e : Throwable =>
log.error(e, "An error occurred during handleExit in actor %s", this)
- exit(e.getMessage)
+ process.exit(e.getMessage)
}
}
})
@@ -69,7 +69,7 @@ abstract class ProcessHolder(ctx : ProcessContext) extends ProcessAdapter {
} catch {
case e : Throwable =>
log.error(e, "An error occurred during handleMonitorExit in actor %s", this)
- exit(e.getMessage)
+ process.exit(e.getMessage)
}
}
})
Something went wrong with that request. Please try again.