From 0cc39cc283811cb10c7c96b53c7f15e7ca86da85 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Mon, 11 Dec 2023 19:13:11 +0530 Subject: [PATCH] defer connector close --- flow/cmd/peer_data.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flow/cmd/peer_data.go b/flow/cmd/peer_data.go index 3204275fda..31ef2a2989 100644 --- a/flow/cmd/peer_data.go +++ b/flow/cmd/peer_data.go @@ -212,6 +212,8 @@ func (h *FlowRequestHandler) GetSlotInfo( if err != nil { return &protos.PeerSlotResponse{SlotData: nil}, err } + defer pgConnector.Close() + slotInfo, err := pgConnector.GetSlotInfo("") if err != nil { return &protos.PeerSlotResponse{SlotData: nil}, err