Add TODO for upstreamConn.register race

This commit is contained in:
Simon Ser 2022-04-15 09:53:30 +02:00
parent 9fb789ee26
commit a6636a9b0d

View File

@ -205,6 +205,8 @@ func (net *network) runConn(ctx context.Context) error {
defer net.user.srv.Identd.Delete(uc.RemoteAddr().String(), uc.LocalAddr().String())
}
// TODO: this is racy, we're not running in the user goroutine yet
// uc.register accesses user/network DB records
uc.register(ctx)
if err := uc.runUntilRegistered(ctx); err != nil {
return fmt.Errorf("failed to register: %w", err)