Resolve dns thing?

This commit is contained in:
Owen Schwartz
2024-11-24 13:06:31 -05:00
parent 79c16a5705
commit 6eac4b5147
2 changed files with 58 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ func NewClient(newtID, secret string, opts ...ClientOption) (*Client, error) {
client := &Client{
config: config,
baseURL: "http://localhost:3000", // default value
baseURL: "https://fossorial.io", // default value
handlers: make(map[string]MessageHandler),
done: make(chan struct{}),
}
@@ -73,7 +73,7 @@ func (c *Client) Connect() error {
}
// Connect to WebSocket
wsURL := fmt.Sprintf("ws://%s/ws", c.baseURL[7:]) // Remove http:// prefix
wsURL := fmt.Sprintf("wss://%s/ws", "fossorial.io") // Remove http:// prefix
u, err := url.Parse(wsURL)
if err != nil {
return fmt.Errorf("failed to parse WebSocket URL: %w", err)