diff --git a/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java b/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java
index <HASH>..<HASH> 100644
--- a/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java
+++ b/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java
@@ -162,9 +162,9 @@ public class ProxySetup {
             if (backgroundThread.isAlive() && !backgroundThread.isInterrupted()) {
                 backgroundThread.closeChannel();
                 backgroundThread.interrupt();
-                backgroundThread = null;
                 logger.log(Level.INFO, "Background thread interrupted in ProxySetup.");
             }
+            backgroundThread = null;
         }
     }
proxy background thread is set to null after server stopping