Sockets of multi connect server's client do not close on minor change from eco server to normal server and normal client
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- networking
调研方向
从 python-sockets-tutorial/multiconn-client.py 和链接的 Stack Overflow 复现开始;将 echo-server 的更改与所描述的 normal-server 流程进行比较。确认消息耗尽后,客户端会到达所示的 if not recv_data 分支并关闭。完成意味着客户端在所描述的两种情况下都能可靠地关闭。
由索引模型根据 Issue 内容生成。
描述
ℹ️
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
- 主要语言
- Jupyter Notebook
- 星标
- 5.2k
- 派生
- 5.3k
- 平均合并
- 4 天 10 小时
- 30 天内合并 PR
- 10
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
realpython/materials 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
realpython/materials#729 ·
-
п 未关闭
难度 5/5 一周以上 新手友好度 1/100
realpython/materials#763 ·
-
难度 1/5 1 小时以内 新手友好度 55/100
realpython/materials#738 ·
-
难度 1/5 1 小时以内 新手友好度 45/100
realpython/materials#737 ·
-
проект2 未关闭
难度 5/5 一周以上 新手友好度 15/100
realpython/materials#725 ·
查看 realpython/materials 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 68/100
canonical/postgresql-watcher-operator#110 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
EleutherAI/lm-evaluation-harness#4201 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
possible bug Stage1
难度 2/5 1-3 小时 新手友好度 78/100
PrismarineJS/mineflayer#4147 ·