diff options
author | 2015-08-12 16:28:58 -0700 | |
---|---|---|
committer | 2015-08-13 10:48:32 -0700 | |
commit | 4c5c7b8647522fa9f21b33add09ae4b7d5ca6512 (patch) | |
tree | a87337cef2ce29a7437f4fb8b7ddf860420e19ec /src/php/ext/grpc/channel.c | |
parent | a63fdd01263f29bdf2ec0d0975f7386370de47ba (diff) |
php: add more tests
Diffstat (limited to 'src/php/ext/grpc/channel.c')
-rw-r--r-- | src/php/ext/grpc/channel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index ebb1320c86..5e0de2959a 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -230,6 +230,8 @@ PHP_METHOD(Channel, getConnectivityState) { * Watch the connectivity state of the channel until it changed * @param long The previous connectivity state of the channel * @param Timeval The deadline this function should wait until + * @return bool If the connectivity state changes from last_state + * before deadline */ PHP_METHOD(Channel, watchConnectivityState) { wrapped_grpc_channel *channel = @@ -255,11 +257,9 @@ PHP_METHOD(Channel, watchConnectivityState) { completion_queue, NULL, gpr_inf_future(GPR_CLOCK_REALTIME)); if (!event.success) { - zend_throw_exception(spl_ce_LogicException, - "watchConnectivityState failed", - 1 TSRMLS_CC); + RETURN_BOOL(0); } - return; + RETURN_BOOL(1); } /** |