~samwhited/xmpp

902001265df08b1f333c2ee9a541c461f8a2b934 — Sam Whited 1 year, 7 months ago 1c406eb
xmpp: take input stream lock when closing stream
1 files changed, 2 insertions(+), 0 deletions(-)

M session.go
M session.go => session.go +2 -0
@@ 875,6 875,8 @@ func (s *Session) sendResp(ctx context.Context, id string, payload xml.TokenRead
// closeInputStream immediately marks the input stream as closed and cancels any
// deadlines associated with it.
func (s *Session) closeInputStream() {
	s.in.Lock()
	defer s.in.Unlock()
	s.state |= InputStreamClosed
	s.in.cancel()
}