python socket OSError: [Errno 9] Bad file descriptor

python socket OSError: [Errno 9] Bad file descriptor的解决办法:

错误的原因是你执行了这句代码:udp_socket.close()即关闭了套接字对象之后,又调用了套接字对象,此时程序就会报OSError: [Errno 9] Bad file descriptor这种错误。仔细检查下你的代码,修改即可。

猜你喜欢

转载自blog.csdn.net/qq_40808154/article/details/89156304