Add context to upstreamConn.register
This commit is contained in:
parent
375ac53f74
commit
e72c896bb4
@ -1916,9 +1916,7 @@ func splitSpace(s string) []string {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (uc *upstreamConn) register() {
|
func (uc *upstreamConn) register(ctx context.Context) {
|
||||||
ctx := context.TODO()
|
|
||||||
|
|
||||||
uc.nick = GetNick(&uc.user.User, &uc.network.Network)
|
uc.nick = GetNick(&uc.user.User, &uc.network.Network)
|
||||||
uc.nickCM = uc.network.casemap(uc.nick)
|
uc.nickCM = uc.network.casemap(uc.nick)
|
||||||
uc.username = GetUsername(&uc.user.User, &uc.network.Network)
|
uc.username = GetUsername(&uc.user.User, &uc.network.Network)
|
||||||
|
2
user.go
2
user.go
@ -220,7 +220,7 @@ func (net *network) run() {
|
|||||||
net.user.srv.Identd.Store(uc.RemoteAddr().String(), uc.LocalAddr().String(), userIdent(&net.user.User))
|
net.user.srv.Identd.Store(uc.RemoteAddr().String(), uc.LocalAddr().String(), userIdent(&net.user.User))
|
||||||
}
|
}
|
||||||
|
|
||||||
uc.register()
|
uc.register(context.TODO())
|
||||||
if err := uc.runUntilRegistered(context.TODO()); err != nil {
|
if err := uc.runUntilRegistered(context.TODO()); err != nil {
|
||||||
text := err.Error()
|
text := err.Error()
|
||||||
temp := true
|
temp := true
|
||||||
|
Loading…
Reference in New Issue
Block a user