network/transport: fix default dial timeout
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
72bbbe3817
commit
be8d09c663
@ -64,6 +64,7 @@ type DialOptions struct {
|
||||
// NewDialOptions returns new DialOptions
|
||||
func NewDialOptions(opts ...DialOption) DialOptions {
|
||||
options := DialOptions{
|
||||
Timeout: DefaultDialTimeout,
|
||||
Context: context.Background(),
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,8 @@ import (
|
||||
var (
|
||||
// DefaultTransport is the global default transport
|
||||
DefaultTransport Transport = NewTransport()
|
||||
// Default dial timeout
|
||||
DefaultDialTimeout = time.Second * 5
|
||||
)
|
||||
|
||||
// Transport is an interface which is used for communication between
|
||||
@ -57,8 +59,3 @@ type DialOption func(*DialOptions)
|
||||
|
||||
// ListenOption is the option signature
|
||||
type ListenOption func(*ListenOptions)
|
||||
|
||||
var (
|
||||
// Default dial timeout
|
||||
DefaultDialTimeout = time.Second * 5
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user