mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +00:00
Don't unwatch if the file descriptor is already closed
This commit is contained in:
parent
55cad42932
commit
33e44ed6be
@ -982,8 +982,10 @@ static int rhizome_fetch_close(struct rhizome_fetch_slot *slot)
|
||||
|
||||
/* close socket and stop watching it */
|
||||
unschedule(&slot->alarm);
|
||||
unwatch(&slot->alarm);
|
||||
close(slot->alarm.poll.fd);
|
||||
if (slot->alarm.poll.fd>=0){
|
||||
unwatch(&slot->alarm);
|
||||
close(slot->alarm.poll.fd);
|
||||
}
|
||||
slot->alarm.poll.fd = -1;
|
||||
slot->alarm.function=NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user