Go vet
This commit is contained in:
parent
5e47e8bd29
commit
951bec8596
@ -132,6 +132,8 @@ func (tunnel *Tunnel) Configure() error {
|
||||
}
|
||||
|
||||
func (tunnel *Tunnel) Start() {
|
||||
defer tunnel.Close()
|
||||
|
||||
for {
|
||||
conn, err := tunnel.Listener.Accept()
|
||||
if err != nil {
|
||||
@ -140,8 +142,6 @@ func (tunnel *Tunnel) Start() {
|
||||
|
||||
go tunnel.handleConnection(conn)
|
||||
}
|
||||
|
||||
tunnel.Close()
|
||||
}
|
||||
|
||||
func NewTunnel(sshInfo *shared.SSHInfo, dbUrl string) (*Tunnel, error) {
|
||||
|
@ -19,7 +19,7 @@ func Test_portAvailable(t *testing.T) {
|
||||
|
||||
serv, err := net.Listen("tcp", "127.0.0.1:8081")
|
||||
if err != nil {
|
||||
fmt.Println(os.Stderr, "Unable to start test tcp listener:", err)
|
||||
fmt.Fprintln(os.Stderr, "Unable to start test tcp listener:", err)
|
||||
t.Fail()
|
||||
return
|
||||
}
|
||||
@ -50,7 +50,7 @@ func Test_getAvailablePort(t *testing.T) {
|
||||
|
||||
serv, err := net.Listen("tcp", "127.0.0.1:8081")
|
||||
if err != nil {
|
||||
fmt.Println(os.Stderr, "Unable to start test tcp listener:", err)
|
||||
fmt.Fprintln(os.Stderr, "Unable to start test tcp listener:", err)
|
||||
t.Fail()
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user