ntp: close only client socket when destroying NCR instance

This commit is contained in:
Miroslav Lichvar 2014-04-10 17:25:28 +02:00
parent 7fa22d4c25
commit 3217421797

View file

@ -395,7 +395,8 @@ NCR_DestroyInstance(NCR_Instance instance)
instance->timer_running = 0; instance->timer_running = 0;
} }
NIO_CloseClientSocket(instance->local_addr.sock_fd); if (instance->mode == MODE_CLIENT)
NIO_CloseClientSocket(instance->local_addr.sock_fd);
/* Free the data structure */ /* Free the data structure */
Free(instance); Free(instance);