]> Cypherpunks.ru repositories - govpn.git/commitdiff
Close old sockets during rehandshake
authorSergey Matveev <stargrave@stargrave.org>
Thu, 17 Sep 2015 17:49:28 +0000 (20:49 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 17 Sep 2015 17:49:28 +0000 (20:49 +0300)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
src/govpn/cmd/govpn-client/tcp.go
src/govpn/cmd/govpn-client/udp.go

index 9a1794a59d6c30f0cb4e586a8d3a342b67c3f356..c8724007b02664871f241da5b6bbccb61eb7cbbb 100644 (file)
@@ -168,4 +168,5 @@ TransportCycle:
                terminator <- struct{}{}
        }
        peer.Zero()
+       conn.Close()
 }
index 1be7a98be778b3ef549cade13798d73695574b71..3cb3eea4decb3f3e0fe8bfad18b32bc66a6f7a7f 100644 (file)
@@ -118,4 +118,5 @@ MainCycle:
        if hs != nil {
                hs.Zero()
        }
+       conn.Close()
 }