Sockets of multi connect server's client do not close on minor change from eco server to normal server and normal client
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- networking
Direzione di ricerca
Inizia da python-sockets-tutorial/multiconn-client.py e dalla riproduzione collegata su Stack Overflow; confronta la modifica di echo-server con il flusso descritto di normal-server. Verifica che, dopo che i messaggi sono stati esauriti, il client raggiunga il ramo mostrato if not recv_data e si chiuda. Il lavoro è completato quando il client si chiude in modo affidabile in entrambi i casi descritti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
ℹ️
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.
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
- Lingua principale
- Jupyter Notebook
- Stelle
- 5.2k
- Fork
- 5.3k
- Merge medio
- 4g 10h
- PR unite (30g)
- 10
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di realpython/materials
-
Ruff lints the whole repo Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
realpython/materials#729 ·
-
п Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
realpython/materials#763 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
realpython/materials#738 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 45/100
realpython/materials#737 ·
-
проект2 Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
realpython/materials#725 ·
Tutte le issue di realpython/materials
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
canonical/postgresql-watcher-operator#110 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
EleutherAI/lm-evaluation-harness#4201 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
possible bug Stage1
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PrismarineJS/mineflayer#4147 ·