mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
binance: use fastjson parser pool
This commit is contained in:
parent
565cdef54f
commit
2ec01e3d28
|
@ -296,9 +296,11 @@ type ResultEvent struct {
|
|||
ID int `json:"id"`
|
||||
}
|
||||
|
||||
func parseWebSocketEvent(message []byte) (interface{}, error) {
|
||||
val, err := fastjson.ParseBytes(message)
|
||||
var parserPool fastjson.ParserPool
|
||||
|
||||
func parseWebSocketEvent(message []byte) (interface{}, error) {
|
||||
parser := parserPool.Get()
|
||||
val, err := parser.Parse(message)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user