Commit 354ca192 authored by hanfeng's avatar hanfeng
Browse files

[trac388] add check to avoid stop server twice

parent 8f331c78
172. [func] feng
Add stop interface into dns server, so we can stop each running
server individually.With it, user can reconfigure its running server
with different ip address or port.
171. [func] feng, jerry, jinmei, vorner
b10-auth, src/lib/datasrc: in memory data source now works as a
complete data source for authoritative DNS servers and b10-auth
......@@ -189,6 +189,10 @@ TCPServer::asyncLookup() {
void TCPServer::stop() {
//server should not be stopped twice
if (stopped_by_hand_)
stopped_by_hand_ = true;
......@@ -281,6 +281,9 @@ UDPServer::asyncLookup() {
/// Stop the UDPServer
UDPServer::stop() {
//server should not be stopped twice
if (data_->stopped_by_hand_)
data_->stopped_by_hand_ = true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment