I am trying to use twisted.conch.ssh to write an application that first
sets up an ssh connection that forwards port 5432 from an external
server to my local machine and then locally connect to a database
running on the server using that port.  I am able to write two separate
applications that accomplish what I want, but I am unable to integrate
them into one.  Using the two application approach, I can first start
the application that sets up my port forwarding and then start the
application that connects to my database.  I can then make queries
using the second application and everything seems to work just fine. 
When integrating them into one application I am still able to connect
to the database, but I cannot run any queries over it.  The queries
hang indefinitely, and neither my callback nor my errback functions
that should run after the query has completed ever get called.  My
setup for implementing this is as follows....
<br><br>I have introduced a deferred when setting up my port
forwarding that gets its callback only once the startFactory() event
gets called for my class derived from forwarding.SSHListenForwardingF<div id="mb_0">actory.&nbsp; The forwarding is setup using the following code snippet.....
<br><br>reactor.listenTCP(PORT, DatabaseForwardingFactory(self.conn, (LOCALHOST, PORT), DatabaseClientForwardingChannel))<br><br>where....<br><br>class DatabaseForwardingFactory(forwarding.SSHListenForwardingFactory):<br>

class DatabaseClientForwardingChannel(forwarding.SSHListenClientForwardingChannel):<br><br>Does
anyone have any idea why this might not be working?&nbsp; I tried deferring
my query to a thread to see if this would help matters, but to no
avail.&nbsp; Any help at all would be appreciated.
<br></div>