mirror of
https://github.com/fosrl/olm.git
synced 2026-03-26 12:36:47 +00:00
Remove redundant info
This commit is contained in:
@@ -375,7 +375,6 @@ func (o *Olm) StartTunnel(config TunnelConfig) {
|
|||||||
config.OrgID,
|
config.OrgID,
|
||||||
config.Endpoint,
|
config.Endpoint,
|
||||||
30*time.Second, // 30 seconds
|
30*time.Second, // 30 seconds
|
||||||
config.PingTimeoutDuration,
|
|
||||||
websocket.WithPingDataProvider(func() map[string]any {
|
websocket.WithPingDataProvider(func() map[string]any {
|
||||||
o.metaMu.Lock()
|
o.metaMu.Lock()
|
||||||
defer o.metaMu.Unlock()
|
defer o.metaMu.Unlock()
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ type Client struct {
|
|||||||
isDisconnected bool // Flag to track if client is intentionally disconnected
|
isDisconnected bool // Flag to track if client is intentionally disconnected
|
||||||
reconnectMux sync.RWMutex
|
reconnectMux sync.RWMutex
|
||||||
pingInterval time.Duration
|
pingInterval time.Duration
|
||||||
pingTimeout time.Duration
|
|
||||||
onConnect func() error
|
onConnect func() error
|
||||||
onTokenUpdate func(token string, exitNodes []ExitNode)
|
onTokenUpdate func(token string, exitNodes []ExitNode)
|
||||||
onAuthError func(statusCode int, message string) // Callback for auth errors
|
onAuthError func(statusCode int, message string) // Callback for auth errors
|
||||||
@@ -159,7 +158,7 @@ func (c *Client) OnAuthError(callback func(statusCode int, message string)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewClient creates a new websocket client
|
// NewClient creates a new websocket client
|
||||||
func NewClient(ID, secret, userToken, orgId, endpoint string, pingInterval time.Duration, pingTimeout time.Duration, opts ...ClientOption) (*Client, error) {
|
func NewClient(ID, secret, userToken, orgId, endpoint string, pingInterval time.Duration, opts ...ClientOption) (*Client, error) {
|
||||||
config := &Config{
|
config := &Config{
|
||||||
ID: ID,
|
ID: ID,
|
||||||
Secret: secret,
|
Secret: secret,
|
||||||
@@ -176,7 +175,6 @@ func NewClient(ID, secret, userToken, orgId, endpoint string, pingInterval time.
|
|||||||
reconnectInterval: 3 * time.Second,
|
reconnectInterval: 3 * time.Second,
|
||||||
isConnected: false,
|
isConnected: false,
|
||||||
pingInterval: pingInterval,
|
pingInterval: pingInterval,
|
||||||
pingTimeout: pingTimeout,
|
|
||||||
clientType: "olm",
|
clientType: "olm",
|
||||||
pingDone: make(chan struct{}),
|
pingDone: make(chan struct{}),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user