(
self,
connection: 'BlockingConnection',
receiver: 'Receiver',
fetcher: Optional[Fetcher],
credit: int = 1
)
| 213 | """ |
| 214 | |
| 215 | def __init__( |
| 216 | self, |
| 217 | connection: 'BlockingConnection', |
| 218 | receiver: 'Receiver', |
| 219 | fetcher: Optional[Fetcher], |
| 220 | credit: int = 1 |
| 221 | ) -> None: |
| 222 | super(BlockingReceiver, self).__init__(connection, receiver) |
| 223 | if self.link.source and self.link.source.address and self.link.source.address != self.link.remote_source.address: |
| 224 | # this may be followed by a detach, which may contain an error condition, so wait a little... |
| 225 | self._waitForClose() |
| 226 | # ...but close ourselves if peer does not |
| 227 | self.link.close() |
| 228 | raise LinkException("Failed to open receiver %s, source does not match" % self.link.name) |
| 229 | if credit: |
| 230 | receiver.flow(credit) |
| 231 | self.fetcher = fetcher |
| 232 | self.container = connection.container |
| 233 | |
| 234 | def __del__(self): |
| 235 | self.fetcher = None |
nothing calls this directly
no test coverage detected