mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-08 19:44:17 +00:00
Only unwatch if we were watching
This commit is contained in:
parent
2a07093c5f
commit
bb39bb871a
@ -573,9 +573,9 @@ end:
|
||||
mdp_close(mdp_sock.poll.fd);
|
||||
mdp_sock.poll.fd=-1;
|
||||
}
|
||||
if (is_watching(&service_sock))
|
||||
unwatch(&service_sock);
|
||||
if (service_sock.poll.fd!=-1){
|
||||
if (is_watching(&service_sock))
|
||||
unwatch(&service_sock);
|
||||
mdp_close(service_sock.poll.fd);
|
||||
service_sock.poll.fd=-1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user