stabilized zmq loop
This commit is contained in:
parent
1cfe9e83bb
commit
53f78abaf3
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"git.paulbsd.com/paulbsd/ipbl/src/config"
|
||||
"git.paulbsd.com/paulbsd/ipbl/src/models"
|
||||
@ -49,6 +50,7 @@ func Handle(cfg *config.Config, reqsock *goczmq.Sock, pubsock *goczmq.Sock, chan
|
||||
err = json.Unmarshal(val, &apievent)
|
||||
if err != nil {
|
||||
log.Println("unable to parse ip address", err)
|
||||
time.Sleep(time.Second)
|
||||
continue
|
||||
}
|
||||
if apievent.IPData.IP != "" && apievent.IPData.IP == lastip {
|
||||
|
Loading…
Reference in New Issue
Block a user