support unexpectedly close connections
Merge branch 'hotfix/fix-connection-close'