I encountered an issue in Proton J which I believe is a race condition. If the input stream is read and passed into the transport, before the sasl() method of TransportImpl.java is called then the _inputProcessor defaults to FrameParser instead of being wrapped by the SASL frame parser. This causes a Frame Parsing error as it expects '0' as per the regular header but instead finds '3' which is the correct format if the process is the SASL frame parser.
We should either test the incoming header and determine the right inputProcessor OR clearly document that the transport needs to be ready (i.e the sasl() method has to be called) before any incoming data is fed to the transport. Rajith
