mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-23 17:47:29 +00:00
Remove unnecessary string copy.
Strings are immutable, so instead of copying as a new variable (like how was needed when receiving byte slices), just pass the marshaled JSON string to the notification processing code.
This commit is contained in:
parent
11ea5e31b4
commit
8952fc5acf
1 changed files with 1 additions and 4 deletions
|
@ -213,11 +213,8 @@ func (btcd *BtcdRPCConn) Start() {
|
||||||
// Try notifications (requests with nil ids) first.
|
// Try notifications (requests with nil ids) first.
|
||||||
n, err := unmarshalNotification(m)
|
n, err := unmarshalNotification(m)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Make a copy of the marshaled notification.
|
|
||||||
mcopy := m
|
|
||||||
|
|
||||||
// Begin processing the notification.
|
// Begin processing the notification.
|
||||||
go processNotification(n, mcopy)
|
go processNotification(n, m)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue