Eyepea / aiosip

SIP support for AsyncIO (DEPRECATED)
Apache License 2.0
82 stars 41 forks source link

TypeError: coroutines cannot be used with call_at() #85

Closed vodik closed 6 years ago

vodik commented 6 years ago

Started seeing this getting thrown once I turned on asyncio debugging:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/coroutines.py", line 126, in send
    return self.gen.send(value)
  File "/home/simon/src/aiosip/aiosip/application.py", line 137, in _dispatch
    await dialog.receive_message(msg)
  File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/simon/src/aiosip/aiosip/dialog.py", line 242, in receive_message
    return await self._receive_request(msg)
  File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/home/simon/src/aiosip/aiosip/dialog.py", line 251, in _receive_request
    self._maybe_close(msg)
  File "/home/simon/src/aiosip/aiosip/dialog.py", line 129, in _maybe_close
    self.close_later()
  File "/home/simon/src/aiosip/aiosip/dialog.py", line 119, in close_later
    self._closing = self.app.loop.call_later(delay, self.close)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 543, in call_later
    timer = self.call_at(self.time() + delay, callback, *args)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 556, in call_at
    self._check_callback(callback, 'call_at')
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 587, in _check_callback
    "coroutines cannot be used with {}()".format(method))
TypeError: coroutines cannot be used with call_at()
vodik commented 6 years ago

Fixed with #86