mirror of
https://github.com/soypat/lneto.git
synced 2026-08-20 06:29:03 +00:00
fix timewait not counting as closed state in listen open; add second part to test
This commit is contained in:
+1
-1
@@ -148,7 +148,7 @@ type recvSpace struct {
|
||||
// To open an active connection use [ControlBlock.Send] with a segment generated with [ClientSynSegment].
|
||||
func (tcb *ControlBlock) Open(iss Value, wnd Size) (err error) {
|
||||
switch {
|
||||
case tcb._state != StateClosed && tcb._state != StateListen:
|
||||
case tcb._state != StateClosed && tcb._state != StateTimeWait:
|
||||
err = errNeedClosedTCBToOpen
|
||||
case wnd > math.MaxUint16:
|
||||
err = errWindowTooLarge
|
||||
|
||||
Reference in New Issue
Block a user