ntp: close only client socket when destroying NCR instance
This commit is contained in:
parent
7fa22d4c25
commit
3217421797
1 changed files with 2 additions and 1 deletions
|
@ -395,7 +395,8 @@ NCR_DestroyInstance(NCR_Instance instance)
|
|||
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(instance);
|
||||
|
|
Loading…
Reference in a new issue