Skip to content

Commit e35c23e

Browse files
Adam Roses Wightejegg
authored andcommitted
Check Stomp API result
Tiny bit of error handling. Bug: T109901 Change-Id: I64ca28b583ccd061cee9487eb706d72800a62d9f
1 parent 6bac0f4 commit e35c23e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/PHPQueue/Backend/Stomp.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ protected function readFrame($properties = null)
113113
if ($properties === null) {
114114
$properties = array('ack' => 'client');
115115
}
116-
$this->getConnection()->subscribe($this->queue_name, $properties);
116+
$result = $this->getConnection()->subscribe($this->queue_name, $properties);
117+
if (!$result) {
118+
throw new BackendException("No response when subscribing to queue {$this->queue_name}");
119+
}
117120
if ($this->read_timeout) {
118121
$this->getConnection()->setReadTimeout($this->read_timeout);
119122
}

0 commit comments

Comments
 (0)