enable compression by default

This commit is contained in:
Marc Tarnutzer
2023-05-05 22:00:25 +02:00
parent ee9502bc3e
commit c86e907142
3 changed files with 17 additions and 54 deletions

View File

@@ -38,9 +38,8 @@ type Relay struct {
URL string
RequestHeader http.Header // e.g. for origin header
Connection *Connection
EnableCompression bool
subscriptions s.MapOf[string, *Subscription]
Connection *Connection
subscriptions s.MapOf[string, *Subscription]
Challenges chan string // NIP-42 Challenges
Notices chan string
@@ -90,7 +89,7 @@ func (r *Relay) Connect(ctx context.Context) error {
defer cancel()
}
conn, err := NewConnection(ctx, r.URL, r.RequestHeader, r.EnableCompression)
conn, err := NewConnection(ctx, r.URL, r.RequestHeader)
if err != nil {
cancel()
return fmt.Errorf("error opening websocket to '%s': %w", r.URL, err)