Use correct method

This commit is contained in:
Martin Polden
2016-04-16 10:53:08 +02:00
parent 7ffaf5e9ac
commit 837a32db56
2 changed files with 2 additions and 3 deletions

View File

@ -98,7 +98,6 @@ func testPort(ip net.IP, port uint64) error {
conn, err := net.DialTimeout("tcp", address, 2*time.Second)
if err != nil {
return err
}
defer conn.Close()
return nil
@ -186,7 +185,7 @@ func (a *API) PortHandler(w http.ResponseWriter, r *http.Request) *appError {
if err != nil {
return internalServerError(err).AsJSON()
}
err = testPort(ip, port)
err = a.testPort(ip, port)
response := TestPortResponse{
IP: ip,
Port: port,