boost :: beast中的“通过对等异常重置连接”

时间:2018-09-18 12:36:52

标签: c++ boost asio beast

我正在使用boost :: beast库的最新版本(即版本:1.68)

我正在尝试使用ssl的sync websocket客户端(非常类似于所提供的示例),经过数小时从服务器正确接收数据后,我的代码终止并出现以下错误:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >
what(): Connection reset by peer

是什么导致此错误?如果无法避免,我是否应该在读取循环中捕获异常并在发生异常时重新连接?

0 个答案:

没有答案
相关问题