Skip to content

Commit

Permalink
fix default max write buffer size value setting
Browse files Browse the repository at this point in the history
  • Loading branch information
lesismal committed Jun 12, 2024
1 parent a3458ca commit c00b749
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engine_std.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func NewEngine(conf Config) *Engine {
if conf.ReadBufferSize <= 0 {
conf.ReadBufferSize = DefaultReadBufferSize
}
if conf.MaxWriteBufferSize < 0 {
if conf.MaxWriteBufferSize <= 0 {
conf.MaxWriteBufferSize = DefaultMaxWriteBufferSize
}
if conf.Listen == nil {
Expand Down
2 changes: 1 addition & 1 deletion engine_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func NewEngine(conf Config) *Engine {
if conf.ReadBufferSize <= 0 {
conf.ReadBufferSize = DefaultReadBufferSize
}
if conf.MaxWriteBufferSize < 0 {
if conf.MaxWriteBufferSize <= 0 {
conf.MaxWriteBufferSize = DefaultMaxWriteBufferSize
}
if conf.MaxConnReadTimesPerEventLoop <= 0 {
Expand Down

0 comments on commit c00b749

Please sign in to comment.