message-size-increase #3

Open
sashakoshka wants to merge 38 commits from message-size-increase into main
Showing only changes of commit 23c37c3d1f - Show all commits

View File

@ -66,18 +66,21 @@ func (this *a) RemoteAddr() net.Addr {
func (this *a) OpenTrans() (Trans, error) {
this.transLock.Lock()
defer this.transLock.Unlock()
if this.transID == int64Max {
return nil, fmt.Errorf("could not open transaction: %w", ErrIntegerOverflow)
}
id := this.transID
this.transID ++
trans := &transA {
parent: this,
id: id,
incoming: usync.NewGate[incomingMessage](),
}
this.transMap[id] = trans
if this.transID == int64Max {
return nil, fmt.Errorf("could not open transaction: %w", ErrIntegerOverflow)
if this.party == ClientSide {
this.transID ++
} else {
this.transID --
}
this.transID ++
return trans, nil
}