@ -13,7 +13,7 @@ func (p *Payload) innerHandler(ctx protocol.Context) {
|
||||
ctx.EndInnerProtocol(protocol.StatusError, nil)
|
||||
return
|
||||
}
|
||||
pl := p.Inner.Handle(ctx.ForInnerProtocol(p.Inner.Type()))
|
||||
pl := p.Inner.Handle(ctx)
|
||||
enc, err := pl.Encode()
|
||||
if err != nil {
|
||||
ctx.Log().WithError(err).Warning("failed to encode inner protocol")
|
||||
|
@ -87,15 +87,15 @@ func (p *Payload) Encode() ([]byte, error) {
|
||||
|
||||
func (p *Payload) Handle(ctx protocol.Context) protocol.Payload {
|
||||
defer func() {
|
||||
ctx.SetProtocolState(p.st)
|
||||
ctx.SetProtocolState(TypeTLS, p.st)
|
||||
}()
|
||||
if ctx.IsProtocolStart() {
|
||||
if ctx.IsProtocolStart(TypeTLS) {
|
||||
p.st = NewState(ctx).(*State)
|
||||
return &Payload{
|
||||
Flags: FlagTLSStart,
|
||||
}
|
||||
}
|
||||
p.st = ctx.GetProtocolState().(*State)
|
||||
p.st = ctx.GetProtocolState(TypeTLS).(*State)
|
||||
|
||||
if p.st.TLS == nil {
|
||||
p.tlsInit(ctx)
|
||||
|
Reference in New Issue
Block a user