EvoluxBR / greenswitch

Battle proven FreeSWITCH Event Socket Protocol client implementation with Gevent
Other
126 stars 50 forks source link

The main loop raise an exception after rejecting a connection that was not started by FreeSWITCH #29

Closed evangilo closed 6 years ago

evangilo commented 6 years ago

Exception:

INFO:root:Starting OutboundESLServer at 0.0.0.0:[5000]
INFO:root:Successfully bound to port 5000
DEBUG:root:Connection count 1
DEBUG:root:Event Processor Running
ERROR:root:Error receiving data, is FreeSWITCH running?
INFO:root:Rejecting call, server is at full capacity, current connection count is 1/1
DEBUG:root:Event Processor Running
ERROR:root:Error receiving data, is FreeSWITCH running?
Traceback (most recent call last):
  File "examples/outbound_socket_example.py", line 79, in <module>
    server.listen()
  File "/var/sites/greenswitch/greenswitch/esl.py", line 484, in listen
    session.stop()
  File "/var/sites/greenswitch/greenswitch/esl.py", line 215, in stop
    self.send('exit')
  File "/var/sites/greenswitch/greenswitch/esl.py", line 209, in send
    response = async_response.get()
  File "/usr/local/lib/python2.7/dist-packages/gevent/event.py", line 382, in get
    self._wait_core(timeout, ())
  File "/usr/local/lib/python2.7/dist-packages/gevent/event.py", line 106, in _wait_core
    result = self.hub.switch()
  File "/usr/local/lib/python2.7/dist-packages/gevent/hub.py", line 630, in switch
    return RawGreenlet.switch(self)
gevent.hub.LoopExit: ('This operation would block forever', <Hub at 0x7f15b3ce1cd0 epoll default pending=0 ref=0 fileno=4>)

STR:

italorossi commented 6 years ago

test with latest master , I did a change a few minutes.