File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ import (
1515
1616func main () {
1717 cfg := smtpsrv.ServerConfig {
18- ReadTimeout : 60 * time .Second ,
18+ ReadTimeout : time .Duration (* flagReadTimeout ) * time .Second ,
19+ WriteTimeout : time .Duration (* flagWriteTimeout ) * time .Second ,
1920 ListenAddr : * flagListenAddr ,
2021 MaxMessageBytes : int (* flagMaxMessageSize ),
2122 BannerDomain : * flagServerName ,
Original file line number Diff line number Diff line change 77 flagListenAddr = flag .String ("listen" , ":smtp" , "the smtp address to listen on" )
88 flagWebhook = flag .String ("webhook" , "http://localhost:8080/my/webhook" , "the webhook to send the data to" )
99 flagMaxMessageSize = flag .Int64 ("msglimit" , 1024 * 1024 * 2 , "maximum incoming message size" )
10+ flagReadTimeout = flag .Int ("timeout.read" , 5 , "the read timeout in seconds" )
11+ flagWriteTimeout = flag .Int ("timeout.write" , 5 , "the write timeout in seconds" )
1012)
1113
1214func init () {
You can’t perform that action at this time.
0 commit comments