Connection on onMessageProcess captured as copy 67/73667/2
authorKyungwook Tak <k.tak@samsung.com>
Thu, 9 Jun 2016 06:16:52 +0000 (15:16 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Thu, 9 Jun 2016 06:21:34 +0000 (15:21 +0900)
commited1fbc88a23ae1a5e5a4395dca7ca4e64592f76a
treef0c9f800227fbf1e2bfd7cbd163b9ca5a37ece42
parent30a1073fad55682c619c4f1853ba39b6e36c3c65
Connection on onMessageProcess captured as copy

Connection can be abnormally closed by the peer and with
std::shared_ptr<Connection> &, it's hardly guarantee validity of the
reference. So we capture std::shared_ptr<Connection> as copy so
increment shared pointer's reference so as to guarantee validity of
connection. Catch exceptions when using connection in process of
onMessageProcess because the connection could be already closed by the
peer.

Change-Id: I391bae78cf663b875b96124f8356d27a38a97dc6
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
src/framework/common/service.cpp
src/framework/common/service.h
src/framework/service/server-service.cpp