Fix intermittent SRP Pub/Sub test failures
SRP unsubscribes asynchronously, so occasionally not all messages were delivered prior to unsubscribe. Test will now unsubscribe on connection close instead.
This commit is contained in:
@@ -52,6 +52,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
||||
* {@code RedisConnection} implementation on top of <a href="https://github.com/spullara/redis-protocol">spullara Redis Protocol</a> library.
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @author Jennifer Hickey
|
||||
*/
|
||||
public class SrpConnection implements RedisConnection {
|
||||
|
||||
@@ -139,6 +140,11 @@ public class SrpConnection implements RedisConnection {
|
||||
isClosed = true;
|
||||
queue.remove(this);
|
||||
|
||||
if (subscription != null) {
|
||||
subscription.doClose();
|
||||
subscription = null;
|
||||
}
|
||||
|
||||
try {
|
||||
client.close();
|
||||
} catch (IOException ex) {
|
||||
|
||||
Reference in New Issue
Block a user