|
|
@ -106,7 +106,7 @@ func (s *BaseOnionService) Connect(hostname string, app tapir.Application) (bool |
|
|
|
} |
|
|
|
|
|
|
|
log.Debugf("Connected to %v [%v]", hostname, connectionID) |
|
|
|
s.connections.Store(connectionID, tapir.NewConnection(s.id, hostname, true, conn, app.NewInstance(), s)) |
|
|
|
s.connections.Store(connectionID, tapir.NewConnection(s, s.id, hostname, true, conn, app.NewInstance())) |
|
|
|
return true, nil |
|
|
|
} |
|
|
|
log.Debugf("Error connecting to %v %v", hostname, err) |
|
|
@ -137,7 +137,7 @@ func (s *BaseOnionService) Listen(app tapir.Application) error { |
|
|
|
if err == nil { |
|
|
|
tempHostname := s.getNewConnectionID() |
|
|
|
log.Debugf("Accepted connection from %v", tempHostname) |
|
|
|
s.connections.Store(tempHostname, tapir.NewConnection(s.id, tempHostname, false, conn, app.NewInstance(), s)) |
|
|
|
s.connections.Store(tempHostname, tapir.NewConnection(s, s.id, tempHostname, false, conn, app.NewInstance())) |
|
|
|
} else { |
|
|
|
log.Debugf("Error accepting connection %v", err) |
|
|
|
return err |
|
|
|