[stream-refactor] send MITO002 earlier

Prevents 2.4 bootstrap from attempting to fetch os_fork too early.

Connection(None).connect(): pid:25098 stdin:81 stdout:81 stderr:79
ssh.localhost:2201: (partial): mitogen__has_sudo_nopw@localhost's password:
ssh.localhost:2201: (password prompt): mitogen__has_sudo_nopw@localhost's password:
ssh.localhost:2201: (unrecognized): mitogen__has_sudo_nopw@localhost's password:
BootstrapProtocol(ssh.localhost:2201): first stage started succcessfully
BootstrapProtocol(ssh.localhost:2201): first stage received bootstrap
ssh.localhost:2201: (partial): MIdmitogen.os_fork
ssh.localhost:2201: (unrecognized partial): MIdmitogen.os_fork
ssh.localhost:2201: failing connection due to TimeoutError(u'Failed to setup connection after 10.00 seconds',)
pull/607/head
David Wilson 5 years ago
parent 402dba4197
commit b1379e6f45

@ -3599,9 +3599,9 @@ class ExternalContext(object):
socket.gethostname()) socket.gethostname())
_v and LOG.debug('Recovered sys.executable: %r', sys.executable) _v and LOG.debug('Recovered sys.executable: %r', sys.executable)
self.broker._py24_25_compat()
if self.config.get('send_ec2', True): if self.config.get('send_ec2', True):
self.stream.transmit_side.write(b('MITO002\n')) self.stream.transmit_side.write(b('MITO002\n'))
self.broker._py24_25_compat()
self.log_handler.uncork() self.log_handler.uncork()
self.dispatcher.run() self.dispatcher.run()
_v and LOG.debug('ExternalContext.main() normal exit') _v and LOG.debug('ExternalContext.main() normal exit')

Loading…
Cancel
Save