mirror of
https://github.com/status-im/consul.git
synced 2025-01-21 19:20:41 +00:00
consul: Adding a sanity check
This commit is contained in:
parent
89bffaf467
commit
bd1a140476
@ -162,6 +162,11 @@ func (s *Server) blockingRPC(b *structs.BlockingQuery, tables MDBTables, run fun
|
||||
goto RUN_QUERY
|
||||
}
|
||||
|
||||
// Sanity check that we have tables to block on
|
||||
if len(tables) == 0 {
|
||||
panic("no tables to block on")
|
||||
}
|
||||
|
||||
// Restrict the max query time
|
||||
if b.MaxQueryTime > maxQueryTime {
|
||||
b.MaxQueryTime = maxQueryTime
|
||||
|
Loading…
x
Reference in New Issue
Block a user