Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception thrown when socket is already closed #1

Open
ixje opened this issue Feb 8, 2014 · 0 comments
Open

exception thrown when socket is already closed #1

ixje opened this issue Feb 8, 2014 · 0 comments

Comments

@ixje
Copy link

ixje commented Feb 8, 2014

I get the following exception when running it against a remote miner (cgminer 3.7.2)

     27             received = self._receive(sock)
     28         finally:
---> 29             sock.shutdown(socket.SHUT_RDWR)
     30             sock.close()
     31 
error: [Errno 57] Socket is not connected

It can easily be solved by catching the above exception as follow:

        finally:
            try:
                sock.shutdown(socket.SHUT_RDWR)
            except socket.error:
                pass
            sock.close()
@ghost ghost mentioned this issue Feb 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant