Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#121 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
redis, swift
Ambito
backend, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Swift
Stelle
182
Fork
29
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di swift-server/RediStack

Tutte le issue di swift-server/RediStack

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.