mirror of
https://github.com/xtaci/smux.git
synced 2024-04-21 10:51:48 +00:00
upd
This commit is contained in:
@@ -14,7 +14,7 @@ const ( // cmds
|
||||
cmdRST // stream close
|
||||
cmdPSH // data push
|
||||
cmdNOP // no operation
|
||||
cmdTerminate // terminate session
|
||||
cmdTerminate // explict terminate session
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -118,7 +118,6 @@ func (s *Session) Close() error {
|
||||
return errors.New(errBrokenPipe)
|
||||
default:
|
||||
close(s.die)
|
||||
s.conn.Close()
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
for k := range s.streams {
|
||||
@@ -127,6 +126,7 @@ func (s *Session) Close() error {
|
||||
f := newFrame(cmdTerminate, 0)
|
||||
bts, _ := f.MarshalBinary()
|
||||
s.lw.Write(bts)
|
||||
s.conn.Close()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user