AP_Periph: do not close if already closed

This commit is contained in:
bugobliterator 2024-02-14 19:46:11 +11:00 committed by Andrew Tridgell
parent a82729589c
commit c1ae140dcd
1 changed files with 3 additions and 0 deletions

View File

@ -938,6 +938,9 @@ local function Client(_sock, _idx)
function self.remove()
DEBUG(string.format("%u: removing client OFFSET=%u", idx, offset))
if self.closed then
return
end
sock:close()
self.closed = true
end