aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manager/ipc_server.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-23 19:38:53 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-23 19:39:09 +0200
commit5d16a7c71e83f46427bc62f95fc917f76a3e834a (patch)
tree1170cf227e6902d5c2a66e5791006970786eb454 /manager/ipc_server.go
parentui: err is a %v (diff)
downloadwireguard-windows-5d16a7c71e83f46427bc62f95fc917f76a3e834a.tar.xz
wireguard-windows-5d16a7c71e83f46427bc62f95fc917f76a3e834a.zip
manager: don't forget to close pipe in runtime config
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--manager/ipc_server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/manager/ipc_server.go b/manager/ipc_server.go
index 0aa7d3a4..a460a27b 100644
--- a/manager/ipc_server.go
+++ b/manager/ipc_server.go
@@ -57,6 +57,7 @@ func (s *ManagerService) RuntimeConfig(tunnelName string, config *conf.Config) e
if err != nil {
return err
}
+ defer pipe.Close()
pipe.SetWriteDeadline(time.Now().Add(time.Second * 2))
_, err = pipe.Write([]byte("get=1\n\n"))
if err != nil {
@@ -67,7 +68,6 @@ func (s *ManagerService) RuntimeConfig(tunnelName string, config *conf.Config) e
if err != nil {
return err
}
- pipe.Close()
runtimeConfig, err := conf.FromUAPI(string(resp), storedConfig)
if err != nil {
return err