When I cause an error inside received_message, it gets silenced and the socket gets closed
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
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- networking
Hướng nghiên cứu
Start with the minimal reproduction in the issue and trace how ws4py.websocket.WebSocket handles exceptions from received_message. Check the error and socket-close path when make_error() raises; done means the behavior is observable and covered by a regression test or documented outcome.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have an error in one of my larger programs that occurs somewhere in received_message or in a function that is called inside of that function. The error is pretty hard to pin down because when it happens it just gets silenced so I can't figure out where it is, and also the socket gets closed. I wrote a smaller program to simulate this and got the same results. Here's the smaller program:
from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool
from ws4py.websocket import WebSocket
cherrypy.config.update({'server.socket_port': 80, 'server.socket_host': '0.0.0.0'})
WebSocketPlugin(cherrypy.engine).subscribe()
cherrypy.tools.websocket = WebSocketTool()
def make_error():
this_makes_an_error()
class EchoWebSocket(WebSocket):
def closed(self, code, reason=None):
print 'socket closed'
def received_message(self, msg):
make_error()
self.send(msg.data, msg.is_binary) # echo
class Root(object):
@cherrypy.expose
def index(self):
return 'some HTML with a websocket javascript connection'
@cherrypy.expose
def ws(self):
# you can access the class instance through
handler = cherrypy.request.ws_handler
if __name__ == '__main__':
cherrypy.quickstart(Root(), '/', config={'/ws': {'tools.websocket.on': True, 'tools.websocket.handler_cls': EchoWebSocket}})```
When I send a message into the socket via JavaScript, I see no error in the console, just a "socket closed."
Thanks for your help!
- Ngôn ngữ chính
- Python
- Star
- 1.1k
- Fork
- 285
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 Lawouach/WebSocket-for-Python
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Lawouach/WebSocket-for-Python#300 ·
-
This project is not well maintained so be very very very patient!Có thể làm lại được @Lawouach đã nhận 669 ngày trước và không có pull request nào đang mở. Đang mởquestion
Lawouach/WebSocket-for-Python#297 · 2 bình luận · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
Lawouach/WebSocket-for-Python#296 ·
-
Make the codes python 3 compatibleCó thể làm lại được @auvipy đã nhận 1075 ngày trước và không có pull request nào đang mở. Đang mở
Lawouach/WebSocket-for-Python#280 · 1 bình luận · 1 người được giao ·
-
Setup new CICó thể làm lại được @auvipy đã nhận 1247 ngày trước và không có pull request nào đang mở. Đang mở
Lawouach/WebSocket-for-Python#275 · 1 người được giao ·
Tất cả issue của Lawouach/WebSocket-for-Python
Issue tương tự
-
good first issue tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Commits pushed after #1095 merged did not land (ahmi/unified-nova-mcp-review-e095 @ 80fa23a)Đang mởbug deferred domain:ci P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
get_page_thumbnail modifies cached page images, affecting later thumbnails and picture exportsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
docling-project/docling-mcp#147 ·
-
issue: A pipe model's Valves button ignores the Allow Chat Valves permissionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-webui/open-webui#32771 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Scheduled Security Scan is failing on mainCó thể đã có người làm @pkupt đã nhận hôm nay. Đang mởsecurity-scan-failure
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 74/100
semantica-agi/semantica#2045 ·
Maintainer thường phản hồi trong vòng 2 ngày