Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

always close the connection in the cmd client #175

Merged
merged 1 commit into from
Oct 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func run(raddr string, p string) error {
if err != nil {
return err
}
defer conn.Close()
str, err := conn.OpenStream()
if err != nil {
return err
Expand All @@ -65,5 +66,5 @@ func run(raddr string, p string) error {
return err
}
log.Printf("Received: %s\n", data)
return conn.Close()
return nil
}