fixed #4103. fix crash when websocket close
Merge pull request #5496 from andyque/bug4103

fixed #4103. fix crash when websocket close