mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(mockindexer): support feeds and webhooks (#1361)
This commit is contained in:
parent
f488c88f1b
commit
c377bc9157
6 changed files with 346 additions and 49 deletions
|
@ -21,12 +21,13 @@ type ServerOptions struct {
|
|||
}
|
||||
|
||||
func NewServer(options *ServerOptions) (*Server, error) {
|
||||
listener, err := net.Listen("tcp", "localhost:6697")
|
||||
|
||||
listener, err := net.Listen("tcp", ":6697")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Printf("IRC server running on %q", listener.Addr())
|
||||
|
||||
return &Server{
|
||||
listener: listener,
|
||||
options: options,
|
||||
|
@ -36,7 +37,6 @@ func NewServer(options *ServerOptions) (*Server, error) {
|
|||
func (s *Server) Run() {
|
||||
for {
|
||||
conn, err := s.listener.Accept()
|
||||
|
||||
if err != nil {
|
||||
log.Printf("Failed accept: %v", err)
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue