Skip to content

Commit

Permalink
Fix: call SetSendBufferSize when setting send buffer size option (#336
Browse files Browse the repository at this point in the history
)
  • Loading branch information
niconorsk committed Feb 7, 2024
1 parent 2334083 commit a49ce33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a49ce33

Please sign in to comment.