Skip to content

Commit

Permalink
server: Don't use buffered channels
Browse files Browse the repository at this point in the history
This ensures minimal delay between sending a transact response and the
update notification being sent via monitor

Signed-off-by: Dave Tucker <[email protected]>
  • Loading branch information
dave-tucker committed Jun 1, 2021
1 parent dd88da9 commit aa08686
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newMonitor(id string, request map[string]*ovsdb.MonitorRequest, client *rpc
id: id,
request: request,
client: client,
updates: make(chan ovsdb.TableUpdates, 10240),
updates: make(chan ovsdb.TableUpdates),
stopCh: make(chan struct{}, 1),
}
go m.sendUpdates()
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewOvsdbServer(db Database, models ...DatabaseModel) (*OvsdbServer, error)
modelsMutex: sync.RWMutex{},
monitors: make(map[*rpc2.Client]*connectionMonitors),
monitorMutex: sync.RWMutex{},
dbUpdates: make(chan ovsdb.TableUpdates, 10240),
dbUpdates: make(chan ovsdb.TableUpdates),
}
o.modelsMutex.Lock()
for _, model := range models {
Expand Down

0 comments on commit aa08686

Please sign in to comment.