Revert "scheduler shutdown"

This reverts commit e54668110ece4c6113a4e880f6ce5c21636978e5.
diff --git a/scheduler/scheduler.cc b/scheduler/scheduler.cc
index e7630d2..225e484 100644
--- a/scheduler/scheduler.cc
+++ b/scheduler/scheduler.cc
@@ -82,13 +82,13 @@
 void
 Scheduler::shutdown()
 {
-  WriteLock lock(m_mutex);
-  if (m_running)
   {
-    event_base_loopbreak(m_base);
-    m_thread.join();
+    WriteLock lock(m_mutex);
     m_running = false;
   }
+  
+  event_base_loopbreak(m_base);
+  m_thread.join();
 }
 
 bool