why does the sftp stub server only allow one connection?

John A Meinel john at arbash-meinel.com
Fri Feb 10 14:31:00 GMT 2006


Robert Collins wrote:
> Its getting quite frustrating now :[
> 
> Rob

Actually, the stub server doesn't only allow 1 connection. It is the
bzrlib.transport.sftp.SingleListener which is doing this.

Specifically you have the lines:

    def run(self):
        s, _ = self._socket.accept()
        # now close the listen socket
        self._socket.close()
        self._callback(s, self.stop_event)

Now, I believe the self.stop_event is supposed to be called by the
callback to indicate the server should stop. (Which is why we only
support a single connection).

I'm not sure how it should be refactored. But we need some way to tell
the server to stop running.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060210/1c45e6ff/attachment.pgp 


More information about the bazaar mailing list