File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ type IdleTimeoutConn struct {
184
184
185
185
// Read is needed to implement the reader part.
186
186
func (i IdleTimeoutConn ) Read (buf []byte ) (int , error ) {
187
- err := i .Conn .SetReadDeadline (time .Now ().Add (viper .GetDuration ("idle-connection-timeout" )))
187
+ err := i .Conn .SetDeadline (time .Now ().Add (viper .GetDuration ("idle-connection-timeout" )))
188
188
if err != nil {
189
189
return 0 , err
190
190
}
@@ -194,7 +194,7 @@ func (i IdleTimeoutConn) Read(buf []byte) (int, error) {
194
194
195
195
// Write is needed to implement the writer part.
196
196
func (i IdleTimeoutConn ) Write (buf []byte ) (int , error ) {
197
- err := i .Conn .SetWriteDeadline (time .Now ().Add (viper .GetDuration ("idle-connection-timeout" )))
197
+ err := i .Conn .SetDeadline (time .Now ().Add (viper .GetDuration ("idle-connection-timeout" )))
198
198
if err != nil {
199
199
return 0 , err
200
200
}
You can’t perform that action at this time.
0 commit comments