summaryrefslogtreecommitdiff
path: root/verify/ipv4.go
diff options
context:
space:
mode:
authorsjlleo <[email protected]>2022-05-20 18:01:07 +0800
committersjlleo <[email protected]>2022-05-20 18:01:07 +0800
commit474ca966f5310052d5581672595432fdf01107b5 (patch)
treeb95387c970a0b59167be252d1e2edbffbfb764ab /verify/ipv4.go
parent997d7233dc0f07cefafd955ec19a829752cc44dd (diff)
Fix: Network Unreachable Reminderv3.0-Alpha.2
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: