Skip to content

Commit

Permalink
merge from stephenh
Browse files Browse the repository at this point in the history
  • Loading branch information
balshor committed Jun 15, 2010
2 parents ff955c6 + dacf0e9 commit 09e8222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" path="src/main/scala"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="ch.epfl.lamp.sdt.launching.SCALA_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=default%2Ctest%2Csources&amp;ivySettingsPath=project%3A%2F%2F%2Fivysettings.xml&amp;loadSettingsOnDemand=false&amp;propertyFiles="/>
<classpathentry kind="output" path="bin/eclipse"/>
Expand Down
4 changes: 3 additions & 1 deletion src/main/scala/fakehttp/Proxy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import fakehttp.ssl._

class Proxy(val interceptor: Interceptor, val port: Int, val sslMode: SslMode) {
val pool = Executors.newCachedThreadPool

// The IncomingRequestHandler will create outgoing traffic, so pass along the outgoingChannelFactory
val outgoingChannelFactory = new NioClientSocketChannelFactory(pool, pool)
val incomingPipelineFactory = new IncomingPipelineFactory(interceptor, sslMode, outgoingChannelFactory)
Expand All @@ -26,6 +26,8 @@ class Proxy(val interceptor: Interceptor, val port: Int, val sslMode: SslMode) {
incomingPipelineFactory.closeRequestHandlers
pool.shutdown
pool.awaitTermination(1, TimeUnit.MINUTES)
incomingBootstrap.releaseExternalResources
outgoingChannelFactory.releaseExternalResources
}
}

Expand Down

0 comments on commit 09e8222

Please sign in to comment.