I am getting multiple threads of the same process in CLOSE_WAIT because of which i am getting ‘too many files open’ error. This is happening when multiple calls to google cloud speech api is made. Have gone through various answers on stackoverflow, but i am unable to figure out the solution. The code I have shared is a trimmed version