Invalid assertion in conch.telnet option negotiation.
[email protected] Thu, 21 Jan 2010 11:23:53 -0000
| Newsgroups | gmane.comp.python.twisted.bugs |
|---|---|
| Message-ID | <[email protected]> |
New submission from spotter <None>:
'''Short:''' Assertion in dont_no_true breaks after WILL-DONT exchange.
'''How to trigger:'''
1. Offer opt by issuing will(opt); You get opt state of: us=no*, him=no;
2. Wait for response, where two things may happen:
2.1 Response is do(opt), do_no_true is called, state is now: us=yes, him=no; and we live to see another data chunk. ('''CORRECT''')
2.2 Response is dont(opt), dont_no_true is called, we land in never-never land and die due to assertion error. ('''BAD''')
'''Possible solution:'''
Wouldn't it be better to just end negotiation if we get dont(opt) here? Currently my solution is to overload in my transport:
{{{
#!python
def dont_no_true(self, state, option):
state.us.negotiating = False
}}}
{{{
#!python
dontMap = Telnet.dontMap
dontMap[('no', True)] = dont_no_true
}}}
I did not took time to look at other assertions in opt negotiations, but is it really the right way to kill object due to something like this? Wouldn't error log message be sufficient?
(Version: Twisted 9.0.0)
----------
Type : defect
Component: conch
Keywords : conch telnet option negotiation assertion
Priority : normal
Nosy :
----------
http://twistedmatrix.com/trac/ticket/4231