Add error checking of boost::asio::[read|write] functions 76/243976/4
authorTomasz Swierczek <t.swierczek@samsung.com>
Fri, 11 Sep 2020 12:15:21 +0000 (14:15 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Fri, 11 Sep 2020 12:38:39 +0000 (14:38 +0200)
commit97e41535d1a8b4e66a7d4ef69251cb6ce9bf420e
tree011b0b2b037fad860a8ee7dedc76778a0b5476d8
parent4f1572dfe59fd0080321ee2f3d25e1c4b1d379b7
Add error checking of boost::asio::[read|write] functions

Acc. to documentation (https://www.boost.org/doc/libs/1_60_0/boost/asio/read.hpp),
the write function should throw an error when there is a problem in reading.

Similarly, read returns number of written bytes which should be checked.

Change-Id: I301ccd4e12661f486362a9b58f7cdd8711c9112d
src/shared/protobuf_asio.cpp