fix deletion of sqs queue regression

Signed-off-by: yaron2 <schneider.yaron@live.com>
This commit is contained in:
yaron2 2022-11-10 10:08:35 -08:00
parent e69ae3751d
commit beaa223bc2
1 changed files with 0 additions and 7 deletions

View File

@ -855,13 +855,6 @@ func (s *snsSqs) Subscribe(subscribeCtx context.Context, req pubsub.SubscribeReq
// Remove the handler
delete(s.topicHandlers, sanitizedName)
// If we can perform management operations, remove the subscription entirely
if !s.metadata.disableEntityManagement {
// Use a background context because subscribeCtx is canceled already
// Error is logged already
_ = s.removeSnsSqsSubscription(s.ctx, subscriptionArn)
}
// If we don't have any topic left, close the poller
if len(s.topicHandlers) == 0 {
s.pollerCancel()