Browse Source

Fix: call `SetSendBufferSize` when setting send buffer size option (#336)

pull/340/head
Nicolai Moore 9 months ago
committed by GitHub
parent
commit
a49ce339b7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      core/tcp.go

2
core/tcp.go

@ -101,7 +101,7 @@ func setSocketOptions(s *stack.Stack, ep tcpip.Endpoint) tcpip.Error {
{ /* TCP recv/send buffer size */
var ss tcpip.TCPSendBufferSizeRangeOption
if err := s.TransportProtocolOption(header.TCPProtocolNumber, &ss); err == nil {
ep.SocketOptions().SetReceiveBufferSize(int64(ss.Default), false)
ep.SocketOptions().SetSendBufferSize(int64(ss.Default), false)
}
var rs tcpip.TCPReceiveBufferSizeRangeOption

Loading…
Cancel
Save