streamDispatcher deadlock bug fix

This commit is contained in:
lnykww 2019-03-01 16:23:48 +08:00
parent 58ec36df49
commit 776e17f0a8
1 changed files with 1 additions and 1 deletions

View File

@ -155,8 +155,8 @@ func (c *Client) streamDispatcher() {
}
c.mhandlers.Lock()
defer c.mhandlers.Unlock()
handler, ok := c.handlers[streamInfo.Proto]
c.mhandlers.Unlock()
if !ok {
conn.Close()
continue