Skip to content

Commit

Permalink
close listener
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzo0107 committed Dec 15, 2019
1 parent 6db7fbe commit 37a8bee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions omssh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ func availablePort() string {
addr := l.Addr().String()
t := strings.Split(addr, ":")
port := t[1]
defer func() {
err := l.Close()
if err != nil {
log.Fatalln(err)
}
}()
return port
}

Expand Down

0 comments on commit 37a8bee

Please sign in to comment.