packages/hyprspace: 0.6.0 -> 0.6.1, close PeX streams correctly
This commit is contained in:
parent
3792b2be5c
commit
9358527fb5
2 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue