Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Subscriptions don't call `onUnsubscribe` if a socket is unexpectedly closed

Đang mở
#121 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
redis, swift
Lĩnh vực
backend, databases

Hướng nghiên cứu

Start by reading the subscription cancellation and socket error handling paths to find where onUnsubscribe is called and how unexpected closure is handled. The issue gives no file or test names, so trace those paths from the subscription entry point; done means onUnsubscribe is called when the socket closes unexpectedly as well as on formal cancellation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

onUnsubscribe is currently only called when a subscription is formally cancelled by the user. If a socket error closes the connection, the subscription isn't alive anymore, but because onUnsubscribe isn't triggered there's no good way of knowing that this event was omitted.

I've currently worked around it using ARC retain/release calls. On deinit of a reference type, the onUnsubscribe is implied, though I'm not even certain that this works in practice.

Ngôn ngữ chính
Swift
Star
182
Fork
29
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của swift-server/RediStack

Tất cả issue của swift-server/RediStack

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.