mirror of
https://gitlab.com/NebulousLabs/go-upnp.git
synced 2025-12-24 12:27:50 +08:00
add possible return statements
This commit is contained in:
committed by
lukechampine
parent
1a02e7a8e4
commit
2b4da134ab
10
upnp.go
10
upnp.go
@@ -69,9 +69,17 @@ func (d *IGD) CheckForwardUDP(port uint16) (bool, error) {
|
||||
// checkForward checks whether a specific TCP or UDP port is forwarded to this host
|
||||
func (d *IGD) checkForward(port uint16, proto string) (bool, error) {
|
||||
|
||||
// Magic happens here.. :-)
|
||||
// Magic happens here.. :-)
|
||||
|
||||
// Successfully determined that port is forwarded to this host
|
||||
return true, nil
|
||||
|
||||
// Successfully determined that port is *not* forwarded to this or any other host
|
||||
return false, nil
|
||||
|
||||
// encountered an error
|
||||
return false, err
|
||||
|
||||
}
|
||||
|
||||
// Forward forwards the specified port, and adds its description to the
|
||||
|
||||
Reference in New Issue
Block a user