forked from quic-go/quic-go
use the new qtls interface for (re)storing app data with a session state
Application data is now retrieved and restored via two callbacks on the qtls.Config. This allows us the get rid of the rather complex wrapping of the qtls.ClientSessionCache. Furthermore, it makes sure that we only restore the application data when qtls decides to actually use the ticket.
This commit is contained in:
@@ -39,7 +39,7 @@ func (t *sessionTicket) Unmarshal(b []byte) error {
|
||||
return errors.New("failed to read RTT")
|
||||
}
|
||||
var tp wire.TransportParameters
|
||||
if err := tp.UnmarshalFromSessionTicket(b[len(b)-r.Len():]); err != nil {
|
||||
if err := tp.UnmarshalFromSessionTicket(r); err != nil {
|
||||
return fmt.Errorf("unmarshaling transport parameters from session ticket failed: %s", err.Error())
|
||||
}
|
||||
t.Parameters = &tp
|
||||
|
||||
Reference in New Issue
Block a user