Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ysoldak committed Jul 8, 2024
1 parent 0831d2b commit 554e0c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (a *Adapter) Receive() (*Message, error) {
// Wait for a message with the given command and direction.
func (a *Adapter) Wait(command Command, direction Direction, timeout time.Duration) (*Message, error) {
start := time.Now()
for time.Since(start) > timeout {
for time.Since(start) < timeout {
message, _ := a.Receive()
// wait for correct message
if message != nil && message.Command == command && message.Direction == direction {
Expand Down

0 comments on commit 554e0c3

Please sign in to comment.