Permalink
Browse files

When stopping the running server, also stop the plugin change scanner.

Previously, subsequent server startups caused error messages complaining that the plugin change scanner was still running.
  • Loading branch information...
1 parent 394c783 commit 6779eb99b1157d8ee3f6b48bd35d75d9a93768f2 @alkemist alkemist committed with alkemist Oct 27, 2009
Showing with 13 additions and 0 deletions.
  1. +13 −0 scripts/_GrailsRun.groovy
@@ -177,6 +177,10 @@ target(startPluginScanner: "Starts the plugin manager's scanner that detects cha
PluginManagerHolder.pluginManager.startPluginChangeScanner()
}
+target(stopPluginScanner: "Stops the plugin manager's scanner that detects changes to artifacts.") {
+ PluginManagerHolder.pluginManager.stopPluginChangeScanner()
+}
+
/**
* Keeps the server alive and checks for changes in domain classes or
* source files under "src". If any changes are detected, the servlet
@@ -300,6 +304,15 @@ target(stopServer: "Stops the Grails servlet container") {
e.printStackTrace()
println "Error stopping server: ${e.message}"
}
+
+ try {
+ stopPluginScanner()
+ }
+ catch (Throwable e) {
+ GrailsUtil.deepSanitize(e)
+ e.printStackTrace()
+ println "Error stopping plugin change scanner: ${e.message}"
+ }
}
event("StatusFinal", ["Server stopped"])
}

0 comments on commit 6779eb9

Please sign in to comment.