praekelt/vumi-freeswitch-esl — pull request #6 by hodgestar (2014-06-05 17:04:52+00:00)
Title: Fix double callback of client.registration_d that occurs on disconnect

```
2014-06-05 16:09:36+0000 [-] Channel disconnect received
2014-06-05 16:09:36+0000 [-] TRACE: Deregistering client.
2014-06-05 16:09:36+0000 [-] Unhandled Error
Traceback (most recent call last):
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/application/app.py", line 392, in startReactor
self.config, oldstdout, oldstderr, self.profiler, reactor)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/application/app.py", line 313, in runReactorWithLogging
reactor.run()
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1192, in run
self.mainLoop()
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1201, in mainLoop
self.runUntilCurrent()
--- ---
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/base.py", line 824, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/eventsocket.py", line 197, in eventReceived
return method(ctx)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/vxfreeswitch/voice.py", line 128, in onDisconnect
self.vumi_transport.deregister_client(self)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/vxfreeswitch/voice.py", line 268, in deregister_client
client.registration_d.callback(None)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 382, in callback
self._startRunCallbacks(result)
File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 483, in _startRunCallbacks
raise AlreadyCalledError
twisted.internet.defer.AlreadyCalledError:
```