mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-17 16:50:31 +00:00
Com cleanup
This commit is contained in:
parent
3ad7a00d72
commit
6d2ab88177
4 changed files with 4 additions and 3 deletions
|
|
@ -177,4 +177,5 @@ func (t *RPC[_, _]) Cleanup() {
|
|||
}
|
||||
close(task.done)
|
||||
}
|
||||
t.calls.Clear()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue