Skip to content

Commit 64dd7cf

Browse files
committed
add opt RequestTimeout
1 parent 2c40f52 commit 64dd7cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

conn.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ func ReconnectWait(reconnectWait time.Duration) ConnectOptionFunc {
101101
}
102102
}
103103

104+
func RequestTimeout(timeout time.Duration) ConnectOptionFunc {
105+
return func(o *ConnectOption) {
106+
o.ReqTimeout = timeout
107+
}
108+
}
109+
104110
type UseOptionFunc func(*UseOption)
105111

106112
type UseOption struct {

0 commit comments

Comments
 (0)