The program connects to a server, and when the connection is closed by the server, if I try to reconnect it says: socket.error: [Errno 9] Bad file descriptor
socket.error: [Errno 9] Bad file descriptor
Assuming this is a connection oriented socket:
No. You have to close the old one and create a new socket,