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

UnboundLocalError in server.py #1236

Closed
kochelmonster opened this Issue Jun 5, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@kochelmonster

kochelmonster commented Jun 5, 2018

  • gevent version: 1.3a2

Description:

the method StreamServer.wrap_socket_and_handle (line 187 in server.py):

def wrap_socket_and_handle(self, client_socket, address):
        # used in case of ssl sockets
        try:
            ssl_socket = self.wrap_socket(client_socket, **self.ssl_args)
            return self.handle(ssl_socket, address)
        finally:
            ssl_socket.close()

causes an UnboundLocalError if self.wrap_socket throws an error (In my case
ConnectionResetError: [Errno 104] Connection reset by peer)

@jamadden jamadden added the bug label Jun 7, 2018

jamadden added a commit that referenced this issue Jun 7, 2018

jamadden added a commit that referenced this issue Jun 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment