summaryrefslogtreecommitdiff
path: root/verify/ipv4.go
diff options
context:
space:
mode:
Diffstat (limited to 'verify/ipv4.go')
-rw-r--r--verify/ipv4.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/verify/ipv4.go b/verify/ipv4.go
index 89e0cc9..6e086c9 100644
--- a/verify/ipv4.go
+++ b/verify/ipv4.go
@@ -20,7 +20,8 @@ func (v *IPv4Verifier) Execute() *VerifyResponse {
response.Type = 1
if v.IP, err = util.DnsResolver(4); err != nil {
- return &VerifyResponse{}
+ response.StatusCode = NetworkUnrachable
+ return &response
}
v.unblockTestChan = make(chan UnblockTestResult)
@@ -33,6 +34,9 @@ func (v *IPv4Verifier) Execute() *VerifyResponse {
for i := 0; i < 3; i++ {
switch res := <-v.unblockTestChan; {
+ case res.err != nil:
+ response.StatusCode = NetworkUnrachable
+
case res.CountryCode != "":
switch res.movieID {
case AreaAvailableID: