Sockets of multi connect server's client do not close on minor change from eco server to normal server and normal client
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu với python-sockets-tutorial/multiconn-client.py và bản tái hiện Stack Overflow được liên kết; so sánh thay đổi của echo-server với luồng normal-server được mô tả. Xác nhận rằng sau khi các thông báo đã được xử lý hết, client đi đến nhánh if not recv_data được hiển thị và đóng lại. Hoàn thành có nghĩa là client đóng một cách đáng tin cậy trong cả hai trường hợp được mô tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
ℹ️
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
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 5.2k
- Fork
- 5.3k
- Merge trung bình
- 4 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 10
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của realpython/materials
-
Ruff lints the whole repo Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
realpython/materials#729 ·
-
п Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
realpython/materials#763 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
realpython/materials#738 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 45/100
realpython/materials#737 ·
-
проект2 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
realpython/materials#725 ·
Tất cả issue của realpython/materials
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Add port prober support for IPv6 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
canonical/postgresql-watcher-operator#110 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EleutherAI/lm-evaluation-harness#4201 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
possible bug Stage1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PrismarineJS/mineflayer#4147 ·