Skip to content

Commit 74388ef

Browse files
author
Alexandre Curreli
committed
Fixed subscribing issue + converted Reader and Writer to trait + made host and port public
1 parent 36e9a05 commit 74388ef

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ organization := "com.livestream"
66

77
name := "scredis"
88

9-
version := "2.0.5"
9+
version := "2.0.6"
1010

1111
scalaVersion := "2.11.2"
1212

src/main/scala/scredis/io/AbstractAkkaConnection.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import java.util.concurrent.{ CountDownLatch, TimeUnit }
1515

1616
abstract class AbstractAkkaConnection(
1717
protected val system: ActorSystem,
18-
protected val host: String,
19-
protected val port: Int,
18+
val host: String,
19+
val port: Int,
2020
@volatile protected var passwordOpt: Option[String],
2121
@volatile protected var database: Int,
2222
@volatile protected var nameOpt: Option[String],

src/main/scala/scredis/io/SubscriberListenerActor.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,9 @@ class SubscriberListenerActor(
111111

112112
override protected def always: Receive = super.always orElse {
113113
case Subscribe(subscription) => {
114+
subscriptionOpt = Some(subscription)
114115
if (isInitialized) {
115-
subscriptionOpt = Some(subscription)
116116
decoders.route(Broadcast(DecoderActor.Subscribe(subscription)), self)
117-
} else {
118-
previousSubscriptionOpt = Some(subscription)
119117
}
120118
}
121119
case Complete(message) => {

src/main/scala/scredis/serialization/Reader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import java.nio.charset.StandardCharsets
1414
* @define e [[scredis.exceptions.RedisReaderException]]
1515
*
1616
*/
17-
abstract class Reader[A] {
17+
trait Reader[A] {
1818

1919
/**
2020
* Internal read method to be implemented.

src/main/scala/scredis/serialization/Writer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import java.nio.charset.StandardCharsets
1414
* @define e [[scredis.exceptions.RedisWriterException]]
1515
*
1616
*/
17-
abstract class Writer[-A] {
17+
trait Writer[A] {
1818

1919
/**
2020
* Internal write method to be implemented.

0 commit comments

Comments
 (0)