mdedetrich commented on code in PR #170:
URL: 
https://github.com/apache/incubator-pekko-http/pull/170#discussion_r1216441033


##########
http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FileUploadDirectives.scala:
##########
@@ -175,9 +176,12 @@ trait FileUploadDirectives {
       implicit val ec = ctx.executionContext
 
       def tempDest(fileInfo: FileInfo): File = {
-        val dest = File.createTempFile("pekko-http-upload", ".tmp")
-        dest.deleteOnExit()
-        dest
+        val dest = Files.createTempFile("pekko-http-upload", ".tmp")
+        Runtime.getRuntime.addShutdownHook(new Thread() {

Review Comment:
   > Will there have many hook threads?
   
   I don't think so but note that this is the same implementation as 
`deleteOnExit` so it should behave the same as current version.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to