JS: Orderbook: Get current state when subscribing.

This commit is contained in:
Stefan Thomas
2013-03-11 09:28:37 +01:00
parent 99c2f44cfa
commit b31c2ea601
2 changed files with 5 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ var OrderBook = function (remote,
if (OrderBook.subscribe_events.indexOf(type) !== -1) {
if (!self._subs && 'open' === self._remote._online_state) {
self._remote.request_subscribe()
.books([self.to_json()])
.books([self.to_json()], true)
.request();
}
self._subs += 1;
@@ -54,7 +54,7 @@ var OrderBook = function (remote,
this._remote.on('connect', function () {
if (self._subs) {
self._remote.request_subscribe()
.books([self.to_json()])
.books([self.to_json()], true)
.request();
}
});