git://git.halfball.org
/
demo-grpc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7116f84
)
move defer close
cniservice
author
Michael Cambria
<mcambria@redhat.com>
Tue, 23 Apr 2019 19:59:46 +0000
(15:59 -0400)
committer
Michael Cambria
<mcambria@redhat.com>
Tue, 23 Apr 2019 19:59:46 +0000
(15:59 -0400)
client/main.go
patch
|
blob
|
history
diff --git
a/client/main.go
b/client/main.go
index
936127a
..
4e47590
100644
(file)
--- a/
client/main.go
+++ b/
client/main.go
@@
-117,6
+117,7
@@
func main() {
conn, err := gRPCtcp()
//conn, err := gRPCunix()
+ defer conn.Close()
if err != nil {
fmt.Fprintf(os.Stderr, " failed to connect to server: %v\n", err)
return
@@
-131,7
+132,6
@@
func main() {
gRPCsendDel(conn, string(confBytes), netns, ifName, args, capabilityArgs)
}
- defer conn.Close()
os.Exit(0)
}