STR:
-
Create an impl of DefaultHookupClient with a specified throttle
val uri="ws://doesnotexist:8080"
val reconnectThrottle = IndefiniteThrottle(Duration(100, MILLISECONDS), Duration(2000, MILLISECONDS))
val clientImpl = new DefaultHookupClient(HookupClientConfig(new URI(uri), throttle = reconnectThrottle)) { // impl omitted }
-
connect()
-
clientImpl.disconnect()
Connection to host [ws://doesnotexist:8080] lost, reconnecting in 2 seconds
Connection to host [ws://doesnotexist:8080] lost, reconnecting in 2 seconds
Connection to host [ws://doesnotexist:8080] lost, reconnecting in 2 seconds