fix race condition on map operation

master
fangdingjun 6 years ago
parent e722eded24
commit ac31db180c

@ -352,11 +352,12 @@ func (c *Conn) Close() error {
s.Close()
}
c.lock.Lock()
for n := range c.streams {
delete(c.streams, n)
}
c.lock.Lock()
C.nghttp2_session_terminate_session(c.session, 0)
C.nghttp2_session_del(c.session)
c.lock.Unlock()

Loading…
Cancel
Save