Skip to content
Browse files

Added missing Http.shutdown calls

  • Loading branch information...
1 parent fdad8e3 commit c8cbfa432ca8f8c42b4ea65fbdefaace15c75edb @skyluc skyluc committed Oct 10, 2012
View
8 src/main/scala/org/scalaide/buildtools/GenerateEcosystemBuilds.scala
@@ -6,6 +6,7 @@ import scala.collection.mutable.HashMap
import java.net.URL
import org.osgi.framework.Version
import scala.collection.immutable.TreeSet
+import dispatch.Http
/**
* !!! This object not thread safe !!! It was used in a single threaded system when implemented.
@@ -55,11 +56,16 @@ class GenerateEcosystemBuilds(rootFolder: String) {
None
})
- for {
+ val res= for {
availableFeatures <- findFeatures(requestedFeatures.toList).right
ecosystemToScalaIDEToAvailableFeatures <- getAvailableScalaIDEs(ecosystems, requestedFeatures.toList, availableFeatures).right
} yield MavenProject2.generateEcosystemsProjects(ecosystemToScalaIDEToAvailableFeatures, new File(rootFolder, "target/builds"))
+
+ // need to stop Dispatch in any cases
+ Http.shutdown()
+ res
+
}
private def getAvailableScalaIDEs(ecosystems: List[EcosystemDescriptor], requestedFeatures: List[PluginDescriptor], availableFeatures: List[FeatureDefinition]): Either[String, Map[EcosystemDescriptor, Map[ScalaIDEDefinition, List[FeatureDefinition]]]] = {
View
8 src/main/scala/org/scalaide/buildtools/UpdateAddonManifests.scala
@@ -40,8 +40,6 @@ object UpdateAddonManifests {
System.exit(2)
}
- // need to stop Dispatch in any cases
- Http.shutdown()
}
}
@@ -51,7 +49,11 @@ class UpdateAddonManifests(repoURL: String, rootFolder: String) {
import Ecosystem._
def apply(): Either[String, String] = {
- P2Repository.fromUrl(repoURL).right.flatMap(updateVersions(_))
+ val res= P2Repository.fromUrl(repoURL).right.flatMap(updateVersions(_))
+
+ // need to stop Dispatch in any cases
+ Http.shutdown()
+ res
}
/**
View
5 src/main/scala/org/scalaide/buildtools/UpdateScalaIDEManifests.scala
@@ -4,6 +4,7 @@ import java.io.File
import scala.io.Source
import java.io.FileWriter
import org.osgi.framework.Version
+import dispatch.Http
object UpdateScalaIDEManifests {
@@ -26,6 +27,7 @@ object UpdateScalaIDEManifests {
}.getOrElse(System.getProperty("user.dir"))
new UpdateScalaIDEManifests(rootFolder)()
+
}
}
@@ -48,6 +50,9 @@ class UpdateScalaIDEManifests(root: String) {
}
println("Build tools: Updating versions in Scala IDE manifests - Done.")
+
+ // need to stop Dispatch in any cases
+ Http.shutdown()
}
/**

0 comments on commit c8cbfa4

Please sign in to comment.
Something went wrong with that request. Please try again.