Skip to content

Commit 70a2142

Browse files
committed
Fix for publisher and add a method to access consumer::connection()
1 parent 02d8972 commit 70a2142

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Consumer.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ public function queue()
130130
return $this->queue;
131131
}
132132

133+
/**
134+
* @return Connection
135+
*/
136+
public function connection()
137+
{
138+
return $this->queue->connection();
139+
}
140+
133141
/**
134142
* @return $this
135143
*

src/Publisher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function publish(Amqp\AmqpMessage $message, $retry = 0, $onRetry = null,
126126
\call_user_func_array($onRetry, [$this, $error]);
127127
}
128128

129-
\usleep(1e6 * $delay);
129+
\usleep((int) (1e6 * $delay));
130130
}
131131
} while (--$retry > 0);
132132

0 commit comments

Comments
 (0)