mirror of
https://github.com/soypat/lneto.git
synced 2026-08-21 06:59:04 +00:00
do not crash if no tcp connections are desired
This commit is contained in:
@@ -28,7 +28,7 @@ func (ps *StackPorts) Reset(protocol uint64, dstPortOffset uint16, maxNodes int)
|
||||
if protocol > math.MaxUint16 {
|
||||
return errInvalidProto
|
||||
} else if maxNodes <= 0 {
|
||||
return errZeroMaxNodes
|
||||
return errZeroMaxNodesArg
|
||||
}
|
||||
ps.handlers = slices.Grow(ps.handlers[:0], maxNodes)
|
||||
*ps = StackPorts{
|
||||
|
||||
Reference in New Issue
Block a user