Skip to content

Commit b10a61c

Browse files
committed
Remove unnecessary logic
1 parent 0ff8cfa commit b10a61c

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

internal/mode/static/handler.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,6 @@ func (h *eventHandlerImpl) sendNginxConfig(
194194
}
195195

196196
for _, gw := range gr.Gateways {
197-
if gw == nil {
198-
// still need to update GatewayClass status
199-
obj := &status.QueueObject{
200-
UpdateType: status.UpdateAll,
201-
}
202-
h.cfg.statusQueue.Enqueue(obj)
203-
return
204-
}
205-
206197
go func() {
207198
if err := h.cfg.nginxProvisioner.RegisterGateway(ctx, gw, gw.DeploymentName.Name); err != nil {
208199
logger.Error(err, "error from provisioner")

internal/mode/static/handler_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ var _ = Describe("eventHandler", func() {
212212
checkUpsertEventExpectations(e)
213213
Expect(fakeProvisioner.RegisterGatewayCallCount()).Should(Equal(0))
214214
Expect(fakeGenerator.GenerateCallCount()).Should(Equal(0))
215+
// status update for GatewayClass should still occur
216+
Expect(fakeStatusUpdater.UpdateGroupCallCount()).Should(Equal(1))
215217
})
216218
})
217219

0 commit comments

Comments
 (0)