Skip to content

Conversation

uzlonewolf
Copy link

I was having a problem with the server hanging and not accepting new connections. I tracked it down to connections which have been opened but then do not complete a SSL/TLS handshake. It can be reproduced by simply opening a TCP connection and then not sending anything; example python:

~$ python3

Python 3.11.2 (main, May  2 2024, 11:59:08) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import socket
>>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> s.connect(('MY IP', PORT))
>>> 

The server is now hung and no other connection can be opened.

Closes #13

I also reworked the server shutdown code so it actually sends the CLOSE command it queues up.

Closes #85

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

Successfully merging this pull request may close these issues.

server close() race condition Occasionally hangs in ssl do_handshake()
1 participant