You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SocketError: <socket._socketobject object at 0x9b663ac>: [Errno 104] Connection reset by peer
ERROR (<_read[http.server] (<socket._socketobject object at 0x93f325c> )>) (<class 'socket.error'>): error(104, 'Connection reset by peer')
Traceback (most recent call last):
File "/home/spaceone/git/circuits/circuits/core/manager.py", line 815, in processTask
value = next(task)
File "/home/spaceone/git/circuits/circuits/net/sockets.py", line 623, in _accept
for _ in do_handshake(sslsock, on_done, on_error, extra_args=(host,)):
File "/home/spaceone/git/circuits/circuits/net/sockets.py", line 63, in do_handshake
sock.do_handshake()
File "/usr/lib/python2.7/ssl.py", line 305, in do_handshake
self._sslobj.do_handshake()
error: [Errno 104] Connection reset by peer
I found this merge conflict in my stashes, don't remember about it but maybe it helps/fix it:
diff --git a/circuits/net/sockets.py b/circuits/net/sockets.py
index 637df2e..bf9bafb 100644
--- a/circuits/net/sockets.py
+++ b/circuits/net/sockets.py
@@ -566,6 +566,7 @@ class Server(BaseComponent):
self._poller.addWriter(self, sock)
self._buffers[sock].append(data)
+<<<<<<< Updated upstream
def _accept(self): # noqa
# XXX: C901: This has a high McCacbe complexity score of 10.
# TODO: Refactor this!
@@ -582,6 +583,31 @@ class Server(BaseComponent):
try:
newsock, host = self._sock.accept()
+=======
+ def _accept(self):
+ newsock = None
+ try:
+ newsock, host = self._sock.accept()
+ if self.secure and HAS_SSL:
+ sslsock = ssl_socket(
+ newsock,
+ server_side=True,
+ keyfile=self.keyfile,
+ ca_certs=self.ca_certs,
+ certfile=self.certfile,
+ cert_reqs=self.cert_reqs,
+ ssl_version=self.ssl_version,
+ do_handshake_on_connect=False
+ )
+ try:
+ _do_handshake_for_non_blocking(sslsock)
+ newsock = sslsock
+ except SSLError as e:
+ self.fire(error(newsock, e))
+ newsock.shutdown(2)
+ newsock.close()
+ return
+>>>>>>> Stashed changes
except SocketError as e:
if e.args[0] in (EWOULDBLOCK, EAGAIN):
return
@@ -606,6 +632,11 @@ class Server(BaseComponent):
# _seems_ to be short-circuited by syncookies.
return
else:
+ if newsock is not None:
+ self.fire(error(newsock, e))
+ newsock.shutdown(2)
+ newsock.close()
+ return
raise
if self.secure and HAS_SSL:
The text was updated successfully, but these errors were encountered:
I found this merge conflict in my stashes, don't remember about it but maybe it helps/fix it:
The text was updated successfully, but these errors were encountered: