mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-07-29 17:02:56 -04:00
always defer close on port check #356
This commit is contained in:
@@ -57,9 +57,6 @@ func CheckPort(host string, port string) bool {
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if conn != nil {
|
||||
defer conn.Close()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
defer conn.Close()
|
||||
return conn != nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user