mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-05 21:12:10 +02:00
migrate to xsync/v3
closes https://github.com/nbd-wtf/go-nostr/issues/117
This commit is contained in:
6
relay.go
6
relay.go
@ -12,7 +12,7 @@ import (
|
||||
|
||||
"github.com/gobwas/ws"
|
||||
"github.com/gobwas/ws/wsutil"
|
||||
"github.com/puzpuzpuz/xsync/v2"
|
||||
"github.com/puzpuzpuz/xsync/v3"
|
||||
)
|
||||
|
||||
type Status int
|
||||
@ -55,8 +55,8 @@ func NewRelay(ctx context.Context, url string, opts ...RelayOption) *Relay {
|
||||
URL: NormalizeURL(url),
|
||||
connectionContext: ctx,
|
||||
connectionContextCancel: cancel,
|
||||
Subscriptions: xsync.NewMapOf[*Subscription](),
|
||||
okCallbacks: xsync.NewMapOf[func(bool, string)](),
|
||||
Subscriptions: xsync.NewMapOf[string, *Subscription](),
|
||||
okCallbacks: xsync.NewMapOf[string, func(bool, string)](),
|
||||
writeQueue: make(chan writeRequest),
|
||||
subscriptionChannelCloseQueue: make(chan *Subscription),
|
||||
}
|
||||
|
Reference in New Issue
Block a user