Skip to content

Commit

Permalink
client: omit mode from Transport header (#611) (#574) (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Sep 9, 2024
1 parent 8198405 commit c9bf79f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1288,9 +1288,8 @@ func (c *Client) doSetup(
v := headers.TransportModeRecord
return &v
}

v := headers.TransportModePlay
return &v
// when playing, omit mode, since it causes errors with some servers.
return nil
}(),
}

Expand Down
2 changes: 2 additions & 0 deletions client_play_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ func TestClientPlay(t *testing.T) {
err2 = inTH.Unmarshal(req.Header["Transport"])
require.NoError(t, err2)

require.Equal(t, (*headers.TransportMode)(nil), inTH.Mode)

var th headers.Transport

switch transport {
Expand Down
2 changes: 2 additions & 0 deletions client_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ func TestClientRecordSerial(t *testing.T) {
err2 = inTH.Unmarshal(req.Header["Transport"])
require.NoError(t, err2)

require.Equal(t, headers.TransportModeRecord, *inTH.Mode)

var l1 net.PacketConn
var l2 net.PacketConn
if transport == "udp" {
Expand Down

0 comments on commit c9bf79f

Please sign in to comment.