Return back timeoutrwc

This commit is contained in:
9seconds
2018-07-02 08:09:22 +03:00
parent 5e82dce22e
commit 0e2898f6be
4 changed files with 40 additions and 8 deletions
+3 -4
View File
@@ -8,11 +8,10 @@ import (
"github.com/juju/errors"
"github.com/9seconds/mtg/config"
"github.com/9seconds/mtg/wrappers"
)
const (
telegramDialTimeout = 10 * time.Second
)
const telegramDialTimeout = 10 * time.Second
type tgDialer struct {
net.Dialer
@@ -36,5 +35,5 @@ func (t *tgDialer) dialRWC(addr string) (io.ReadWriteCloser, error) {
return nil, err
}
return conn, nil
return wrappers.NewTimeoutRWC(conn), nil
}