THRIFT-1290. cpp: TNonblockingServer: clean up state in the
destructor
Patch: Adam Simpkins
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1161655 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index 550a526..681cbdb 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -812,7 +812,7 @@
// Print some libevent stats
GlobalOutput.printf("libevent %s method %s",
event_get_version(),
- event_get_method());
+ event_base_get_method(eventBase_));
// Register the server event
event_set(&serverEvent_,
@@ -913,7 +913,7 @@
}
// Initialize libevent core
- registerEvents(static_cast<event_base*>(event_init()), true);
+ registerEvents(static_cast<event_base*>(event_base_new()), true);
// Run the preServe event
if (eventHandler_ != NULL) {