From 9358527fb558f3500b76d86a12c539a116381032 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 23 Mar 2023 23:26:38 +0100 Subject: [PATCH] packages/hyprspace: 0.6.0 -> 0.6.1, close PeX streams correctly --- packages/networking/hyprspace/p2p/pex.go | 4 ++++ packages/networking/hyprspace/project.nix | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/networking/hyprspace/p2p/pex.go b/packages/networking/hyprspace/p2p/pex.go index 1a6d5f9..5f5baf3 100644 --- a/packages/networking/hyprspace/p2p/pex.go +++ b/packages/networking/hyprspace/p2p/pex.go @@ -82,8 +82,10 @@ func RequestPeX(ctx context.Context, host host.Host, peers []peer.ID) (addrInfos for { str, err := buf.ReadString('\n') if err == io.EOF { + s.Close() return addrInfos, nil } else if checkErrPeX(err, s) { + s.Close() return nil, err } str = strings.TrimSuffix(str, "\n") @@ -92,10 +94,12 @@ func RequestPeX(ctx context.Context, host host.Host, peers []peer.ID) (addrInfos addrStr := splits[1] peerId, err := peer.Decode(idStr) if checkErrPeX(err, s) { + s.Close() return nil, err } ma, err := multiaddr.NewMultiaddr(addrStr) if checkErrPeX(err, s) { + s.Close() return nil, err } fmt.Printf("[-] Got PeX peer: %s/p2p/%s\n", addrStr, idStr) diff --git a/packages/networking/hyprspace/project.nix b/packages/networking/hyprspace/project.nix index 67363ca..a891952 100644 --- a/packages/networking/hyprspace/project.nix +++ b/packages/networking/hyprspace/project.nix @@ -10,7 +10,7 @@ }; packages.hyprspace = with pkgs; buildGo119Module { pname = "hyprspace"; - version = "0.6.0"; + version = "0.6.1"; src = with inputs.nix-filter.lib; let dirs = map inDirectory;