diff --git a/include/channel.h b/include/channel.h index 94a7b99c..39a22290 100644 --- a/include/channel.h +++ b/include/channel.h @@ -52,8 +52,7 @@ class Channel */ void onReady(const SuccessCallback &callback) { - // store callback in implementation - _implementation->_readyCallback = callback; + _implementation->onReady(callback); } /** @@ -66,8 +65,7 @@ class Channel */ void onError(const ErrorCallback &callback) { - // store callback in implementation - _implementation->_errorCallback = callback; + _implementation->onError(callback); } /** diff --git a/include/channelimpl.h b/include/channelimpl.h index f03930d8..b9c51db7 100644 --- a/include/channelimpl.h +++ b/include/channelimpl.h @@ -144,9 +144,40 @@ class ChannelImpl : public Watchable, public std::enable_shared_from_thissend(frame); + if (!_connection->send(frame)) return false; + + // frame was sent, if this was a synchronous frame, we now have to wait + _synchronous = frame.synchronous(); + + // done + return true; } /**