summaryrefslogtreecommitdiffstats
path: root/src/server/PortImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-17 21:50:35 +0000
committerDavid Robillard <d@drobilla.net>2012-11-17 21:50:35 +0000
commitd04ce4cb7d4aa3eb72bc79c09dfe5bb025ad79f4 (patch)
treed7be2189bf19375e2c2f4631a5905047d16307a8 /src/server/PortImpl.cpp
parente04c114e90b37ff7ed6a479205875616e6afce1f (diff)
downloadingen-d04ce4cb7d4aa3eb72bc79c09dfe5bb025ad79f4.tar.gz
ingen-d04ce4cb7d4aa3eb72bc79c09dfe5bb025ad79f4.tar.bz2
ingen-d04ce4cb7d4aa3eb72bc79c09dfe5bb025ad79f4.zip
Gracefully handle failure to send notifications due to buffer overrun.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4827 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PortImpl.cpp')
-rw-r--r--src/server/PortImpl.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index a5fe8fe6..dfd24dc0 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -367,9 +367,13 @@ PortImpl::broadcast_value(Context& context, bool force)
}
if (val.is_valid() && (force || val != _last_broadcasted_value)) {
- _last_broadcasted_value = val;
- context.notify(key, context.start(), this,
- val.size(), val.type(), val.get_body());
+ if (context.notify(key, context.start(), this,
+ val.size(), val.type(), val.get_body())) {
+ _last_broadcasted_value = val;
+ }
+
+ /* On failure, last_broadcasted_value remains unaffected, so we'll try
+ again next cycle and so on until the value is finally delivered. */
}
}