mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 19:04:02 +03:00
Return back timeoutrwc
This commit is contained in:
+3
-4
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user