mirror of
https://github.com/unitoftime/rtcnet.git
synced 2025-09-27 04:36:08 +08:00
Double the timeout for the initial connection to complete
This commit is contained in:
2
dial.go
2
dial.go
@@ -13,7 +13,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Dial(address string, tlsConfig *tls.Config, ordered bool, iceServers []string) (*Conn, error) {
|
func Dial(address string, tlsConfig *tls.Config, ordered bool, iceServers []string) (*Conn, error) {
|
||||||
dialCtx, cancel := context.WithTimeout(context.Background(), 5 * time.Second) // TODO: pass in timeout
|
dialCtx, cancel := context.WithTimeout(context.Background(), 10 * time.Second) // TODO: pass in timeout
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
wSock, err := dialWebsocket(address, tlsConfig, dialCtx)
|
wSock, err := dialWebsocket(address, tlsConfig, dialCtx)
|
||||||
|
Reference in New Issue
Block a user