Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#121 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
redis, swift
Domínio
backend, databases

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Swift
Estrelas
182
Forks
29
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de swift-server/RediStack

Todas as issues de swift-server/RediStack

Issues semelhantes

Mais issues de Swift

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.