Index: dart/runtime/bin/eventhandler.cc |
diff --git a/dart/runtime/bin/eventhandler.cc b/dart/runtime/bin/eventhandler.cc |
index 52f25399231338c9c05108151fdabf964a692302..9e53d5f67ba27efaa9bba2b9be2cb3c7a5c8b253 100644 |
--- a/dart/runtime/bin/eventhandler.cc |
+++ b/dart/runtime/bin/eventhandler.cc |
@@ -61,6 +61,9 @@ static Monitor *shutdown_monitor = NULL; |
void EventHandler::Start() { |
+ // Initialize global socket registry. |
+ ListeningSocketRegistry::Initialize(); |
+ |
ASSERT(event_handler == NULL); |
shutdown_monitor = new Monitor(); |
event_handler = new EventHandler(); |
@@ -91,6 +94,9 @@ void EventHandler::Stop() { |
event_handler = NULL; |
delete shutdown_monitor; |
shutdown_monitor = NULL; |
+ |
+ // Destroy the global socket registry. |
+ ListeningSocketRegistry::Cleanup(); |
} |