diff options
Diffstat (limited to 'pkg/tcpip/transport/tcp/endpoint.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/endpoint.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index 96a546aa7..1649dbc97 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -654,21 +654,25 @@ func (e *endpoint) SetSockOpt(opt interface{}) *tcpip.Error { case tcpip.DelayOption: if v == 0 { atomic.StoreUint32(&e.delay, 0) + + // Handle delayed data. + e.sndWaker.Assert() } else { atomic.StoreUint32(&e.delay, 1) } + return nil case tcpip.CorkOption: if v == 0 { atomic.StoreUint32(&e.cork, 0) + + // Handle the corked data. + e.sndWaker.Assert() } else { atomic.StoreUint32(&e.cork, 1) } - // Handle the corked data. - e.sndWaker.Assert() - return nil case tcpip.ReuseAddressOption: |