Com cleanup

This commit is contained in:
sergystepanov 2026-07-04 16:02:02 +03:00
parent 3ad7a00d72
commit 6d2ab88177
4 changed files with 4 additions and 3 deletions

View file

@ -177,4 +177,5 @@ func (t *RPC[_, _]) Cleanup() {
}
close(task.done)
}
t.calls.Clear()
}

View file

@ -18,7 +18,7 @@ type HasServerInfo interface {
}
func NewUser(sock *com.Connection, log *logger.Logger) *User {
conn := com.NewConnection[api.PT, api.In[com.Uid], api.Out, *api.Out](sock, com.NewUid(), log)
conn := com.NewConnection[api.PT, api.In[com.Uid], api.Out](sock, com.NewUid(), log)
return &User{
Connection: conn,
log: log.Extend(log.With().

View file

@ -60,7 +60,7 @@ type AppMeta struct {
}
func NewWorker(sock *com.Connection, handshake api.ConnectionRequest[com.Uid], log *logger.Logger) *Worker {
conn := com.NewConnection[api.PT, api.In[com.Uid], api.Out, *api.Out](sock, handshake.Id, log)
conn := com.NewConnection[api.PT, api.In[com.Uid], api.Out](sock, handshake.Id, log)
return &Worker{
Connection: conn,
Addr: handshake.Addr,

View file

@ -54,7 +54,7 @@ func newCoordinatorConnection(host string, conf config.Worker, addr string, log
}
clog := log.Extend(log.With().Str(logger.ClientField, "c"))
client := com.NewConnection[api.PT, api.In[com.Uid], api.Out, *api.Out](conn, id, clog)
client := com.NewConnection[api.PT, api.In[com.Uid], api.Out](conn, id, clog)
return &coordinator{
Connection: client,