@@ -12,7 +12,6 @@ import (
1212
1313// A Stream managed by the multiplexer.
1414type Stream struct {
15- fwu time.Time
1615 idx uint8
1716 mux * Mux
1817 rbf []byte
@@ -87,7 +86,6 @@ func (s *Stream) Write(p []byte) (int, error) {
8786 buf []byte
8887 l = 0
8988 n = 0
90- z = 1
9189 )
9290 for {
9391 switch {
@@ -105,10 +103,7 @@ func (s *Stream) Write(p []byte) (int, error) {
105103 binary .BigEndian .PutUint16 (buf [2 :4 ], uint16 (l ))
106104 copy (buf [4 :], p [:l ])
107105 p = p [l :]
108- if time .Now ().After (s .fwu ) {
109- z = 2
110- }
111- err := s .mux .pri .Pri (z , func () error {
106+ err := s .mux .pri .Pri (1 , func () error {
112107 if err := s .wer .Get (); err != nil {
113108 return err
114109 }
@@ -129,7 +124,6 @@ func (s *Stream) Write(p []byte) (int, error) {
129124// NewStream returns a new Stream.
130125func NewStream (idx uint8 , mux * Mux ) * Stream {
131126 return & Stream {
132- fwu : time .Now ().Add (Conf .FastWriteDuration ),
133127 idx : idx ,
134128 mux : mux ,
135129 rbf : make ([]byte , 0 ),
@@ -281,7 +275,7 @@ func NewMux(conn io.ReadWriteCloser) *Mux {
281275 ach : make (chan * Stream ),
282276 con : conn ,
283277 idp : NewSip (),
284- pri : priority .NewPriority (3 ),
278+ pri : priority .NewPriority (2 ),
285279 rer : NewErr (),
286280 usb : make ([]* Stream , 256 ),
287281 }
0 commit comments