mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
dispatch: channel reuse fix (#1237)
* Add test for dispatch channel reuse * Dispatcher - make chans bidirectional * No need to to keep the type assertion separate from the Get() * Unexport Pipe's channel and add getter
This commit is contained in:
@@ -714,7 +714,7 @@ func (s *RPCServer) GetAccountInfoStream(r *gctrpc.GetAccountInfoRequest, stream
|
||||
}()
|
||||
|
||||
for {
|
||||
data, ok := <-pipe.C
|
||||
data, ok := <-pipe.Channel()
|
||||
if !ok {
|
||||
return errDispatchSystem
|
||||
}
|
||||
@@ -2188,7 +2188,7 @@ func (s *RPCServer) GetExchangeOrderbookStream(r *gctrpc.GetExchangeOrderbookStr
|
||||
}()
|
||||
|
||||
for {
|
||||
data, ok := <-pipe.C
|
||||
data, ok := <-pipe.Channel()
|
||||
if !ok {
|
||||
return errDispatchSystem
|
||||
}
|
||||
@@ -2273,7 +2273,7 @@ func (s *RPCServer) GetTickerStream(r *gctrpc.GetTickerStreamRequest, stream gct
|
||||
}()
|
||||
|
||||
for {
|
||||
data, ok := <-pipe.C
|
||||
data, ok := <-pipe.Channel()
|
||||
if !ok {
|
||||
return errDispatchSystem
|
||||
}
|
||||
@@ -2326,7 +2326,7 @@ func (s *RPCServer) GetExchangeTickerStream(r *gctrpc.GetExchangeTickerStreamReq
|
||||
}()
|
||||
|
||||
for {
|
||||
data, ok := <-pipe.C
|
||||
data, ok := <-pipe.Channel()
|
||||
if !ok {
|
||||
return errDispatchSystem
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user