This commit is contained in:
xtaci
2016-08-31 23:29:36 +08:00
parent 5d8052e51e
commit 058325ee28
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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
}