Code Review
/
govpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
3f1edad
)
Mock Adapter: Switch back to handlers once the queue is empty.
31/9431/1
author
Milan Lenco
<milan.lenco@pantheon.tech>
Wed, 15 Nov 2017 10:52:18 +0000
(11:52 +0100)
committer
Milan Lenco
<milan.lenco@pantheon.tech>
Wed, 15 Nov 2017 15:58:00 +0000
(16:58 +0100)
Change-Id: Ifc85a80498521ef218a34072cce470bf32cead9c
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
adapter/mock/mock_adapter.go
patch
|
blob
|
history
diff --git
a/adapter/mock/mock_adapter.go
b/adapter/mock/mock_adapter.go
index
8c88030
..
e6b4bc4
100644
(file)
--- a/
adapter/mock/mock_adapter.go
+++ b/
adapter/mock/mock_adapter.go
@@
-274,6
+274,11
@@
func (a *VppAdapter) SendMsg(clientID uint32, data []byte) error {
}
if len(replies) > 0 {
replies = []api.Message{}
+ if len(replyHandlers) > 0 {
+ // Switch back to handlers once the queue is empty to revert back
+ // the fallthrough effect.
+ mode = useReplyHandlers
+ }
return nil
}