errno 12 ENOMEM ?
-
Dear all,
Some advances by the end of the week.
I have tried from a clean code, just building a new program. I come back to the option to open the socket, send all data in a loop, and at the end of the loop, close the socket.
I am not so sure why, BUT now the ENOMEM error just appears from time to time. Moreover, I don't need any server (blocking or non-blocking) running.
Moreover, I place this exception into the loop, and allow me to "reconnect" and continue the program even if an error appers.flag = 1 Nerrors = 0; socketUDP = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) while (flag<200): time.sleep(0.05) data=bytes() data = data + b'counter = ' + bytes(str(flag),'utf-8') try: sent = socketUDP.sendto(data, addr) print(data) led.toggle() flag=flag+1 except OSError: Nerrors+=1 print('error ', Nerrors) continue socketUDP.close()I am thinking that the problem might come from the wifi connection to the router... I will check this next week.
BR
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login