File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
http-core/src/main/scala/org/apache/pekko/http Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import pekko.annotation.InternalApi
20
20
import pekko .http .impl .engine .ws .Randoms
21
21
import pekko .http .impl .util ._
22
22
import pekko .util .ByteString
23
- import pekko .util .JavaDurationConverters ._
24
23
import com .typesafe .config .Config
25
24
26
25
import scala .concurrent .duration .Duration
@@ -40,7 +39,7 @@ private[pekko] final case class WebSocketSettingsImpl(
40
39
s " Unsupported keep-alive mode detected! Was [ $periodicKeepAliveMode], yet only: ${WebSocketSettingsImpl .KeepAliveModes } are supported. " )
41
40
42
41
override def getPeriodicKeepAliveMaxIdle : java.time.Duration =
43
- periodicKeepAliveMaxIdle.asJava
42
+ JavaDurationConverter .toJava(periodicKeepAliveMaxIdle)
44
43
override def productPrefix = " WebSocketSettings"
45
44
46
45
}
Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ import pekko.actor.ActorSystem
22
22
import pekko .annotation .DoNotInherit
23
23
import pekko .http .impl .settings .WebSocketSettingsImpl
24
24
import pekko .util .ByteString
25
- import pekko .util .JavaDurationConverters ._
26
25
import com .typesafe .config .Config
27
26
28
27
import scala .concurrent .duration .Duration
28
+ import scala .jdk .DurationConverters ._
29
29
30
30
/**
31
31
* Public API but not intended for subclassing
@@ -60,7 +60,7 @@ trait WebSocketSettings { self: WebSocketSettingsImpl =>
60
60
* @since 1.3.0
61
61
*/
62
62
def withPeriodicKeepAliveMaxIdle (newValue : JDuration ): WebSocketSettings =
63
- copy(periodicKeepAliveMaxIdle = newValue.asScala )
63
+ copy(periodicKeepAliveMaxIdle = newValue.toScala )
64
64
def withPeriodicKeepAliveData (newValue : Supplier [ByteString ]): WebSocketSettings =
65
65
copy(periodicKeepAliveData = () => newValue.get())
66
66
You can’t perform that action at this time.
0 commit comments