bugfix: assertion failed when connection reset by peer