AP_Scripting: fixed memory leak in sendfile()

this leaked the SocketAPM on each sendfile() call, we now rely on the
script calling close(). The net_webserver.lua is already using close()
correctly, this change just makes close able to find the socket
This commit is contained in:
Andrew Tridgell
2024-01-04 10:23:57 +11:00
parent 7292c89766
commit efac52136b
3 changed files with 29 additions and 52 deletions

View File

@@ -328,7 +328,6 @@ void AP_Scripting::thread(void) {
_net_sockets[i] = nullptr;
}
}
num_net_sockets = 0;
#endif // AP_NETWORKING_ENABLED
// Clear blocked commands