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

Sockets of multi connect server's client do not close on minor change from eco server to normal server and normal client #241

Open
ganeshkbhat opened this issue Jan 10, 2022 · 0 comments

Comments

@ganeshkbhat
Copy link

ℹ️
After I use it (https://github.com/realpython/materials/blob/master/python-sockets-tutorial/multiconn-client.py) with a small change (minor change from echo server to normal server) -

- after sending and receiving messages from the client and server, the client does not close; or
- all data.messages have been exausted, the client does not close.

https://stackoverflow.com/questions/70640602/sockets-in-python-client-not-closing-after-event-read-write-events-in-multi-conn

You can report issues and problems here, but we typically won't be able to provide 1:1 support outside the channels listed above.

Describe the bug
After minor change from echo server to normal server:

- after sending and receiving messages from the client and server, the client does not close; or
- all data.messages have been exausted, the client does not close.

To Reproduce
Provided in the stackoverflow question

Expected behavior
The client should close. Looks like it does not get into the if not recv_data code while I was checking. The program should reach the code. No major changes to the code has been made other than sending data from messages section. :

if not recv_data:
    print("closing connection", data.connid)
    sel.unregister(sock)
    sock.close()

Screenshots
Added to link:
https://stackoverflow.com/questions/70640602/sockets-in-python-client-not-closing-after-event-read-write-events-in-multi-conn

Desktop (please complete the following information):

  • OS: [e.g. iOS] Win, Linux

Additional context
NA

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