Fix for delete device hangs.
Don't wait for adapter responses for flow update operations holding the device lock.
Amendments:
Create a completed response instead of using nil.
Fix ro_core docker builds
Change-Id: I04228c7bee5cf83c493d885c6751fd911a32c4f6
diff --git a/rw_core/utils/core_utils.go b/rw_core/utils/core_utils.go
index 584d923..82465ef 100644
--- a/rw_core/utils/core_utils.go
+++ b/rw_core/utils/core_utils.go
@@ -58,6 +58,19 @@
}
}
+// Fake a completed response.
+func DoneResponse() Response {
+ r := Response{
+ &response{
+ err: nil,
+ ch: make(chan struct{}),
+ done: true,
+ },
+ }
+ close(r.ch)
+ return r
+}
+
// Error sends a response with the given error. It may only be called once.
func (r Response) Error(err error) {
// if this is called twice, it will panic; this is intentional