Remove unused sync.map

This commit is contained in:
c0re100 2023-11-25 19:52:46 +08:00
parent 4459ee0f55
commit 434963f2c9
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF

View file

@ -19,7 +19,6 @@ type Client struct {
listenerStore *listenerStore listenerStore *listenerStore
catchersStore *sync.Map catchersStore *sync.Map
successMsgStore *sync.Map successMsgStore *sync.Map
forwardMsgStore *sync.Map
updatesTimeout time.Duration updatesTimeout time.Duration
catchTimeout time.Duration catchTimeout time.Duration
} }
@ -75,7 +74,6 @@ func NewClient(authorizationStateHandler AuthorizationStateHandler, options ...O
listenerStore: newListenerStore(), listenerStore: newListenerStore(),
catchersStore: &sync.Map{}, catchersStore: &sync.Map{},
successMsgStore: &sync.Map{}, successMsgStore: &sync.Map{},
forwardMsgStore: &sync.Map{},
} }
client.extraGenerator = UuidV4Generator() client.extraGenerator = UuidV4Generator()
@ -116,10 +114,6 @@ func (client *Client) processResponse(response *Response) {
if sOk { if sOk {
sendVal.(chan *Response) <- response sendVal.(chan *Response) <- response
} }
forwardVal, fOk := client.forwardMsgStore.Load(typ.(*UpdateMessageSendSucceeded).OldMessageId)
if fOk {
forwardVal.(chan *Response) <- response
}
} }
if len(client.listenerStore.Listeners()) == 0 { if len(client.listenerStore.Listeners()) == 0 {