message-size-increase #3
11
metadapta.go
11
metadapta.go
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user