Fix NPE when ACN is in Error State on Listen
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-06-02 10:22:09 -07:00
parent 7f8b475fd7
commit 88ddcc8fa2
1 changed files with 1 additions and 1 deletions

View File

@ -155,10 +155,10 @@ func (s *BaseOnionService) Listen(app tapir.Application) error {
s.lock.Lock()
ls, err := s.acn.Listen(s.privateKey, s.port)
s.ls = ls
log.Debugf("Starting a service on %v ", ls.AddressFull())
s.lock.Unlock()
if err == nil {
log.Debugf("Starting a service on %v ", ls.AddressFull())
for {
conn, err := s.ls.Accept()
if err == nil {