diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs
index 72a2d2760bf3a21fbfc5dcb5875ea74bfc6109f8..a289fa9b1f0bb9fcc9ebf46a6887e3ace703762a 100644
--- a/htools/Ganeti/HTools/QC.hs
+++ b/htools/Ganeti/HTools/QC.hs
@@ -1931,7 +1931,7 @@ prop_Luxi_ClientServer dnschars = monadicIO $ do
   _ <- run . forkIO $
     bracket
       (Luxi.acceptClient server)
-      (\c -> Luxi.closeClient c >> removeFile fpath)
+      (\c -> Luxi.closeClient c >> Luxi.closeServer fpath server)
       luxiServerPong
   replies <- run $
     bracket