Changeset View
Changeset View
Standalone View
Standalone View
src/view/page/PhabricatorStandardPageView.php
| Show First 20 Lines • Show All 533 Lines • ▼ Show 20 Lines | if ($request->isHTTPS()) { | ||||
| $with_protocol = 'http'; | $with_protocol = 'http'; | ||||
| } | } | ||||
| $servers = PhabricatorNotificationServerRef::getEnabledClientServers( | $servers = PhabricatorNotificationServerRef::getEnabledClientServers( | ||||
| $with_protocol); | $with_protocol); | ||||
| if ($servers) { | if ($servers) { | ||||
| if ($user && $user->isLoggedIn()) { | if ($user && $user->isLoggedIn()) { | ||||
| // TODO: We could be smarter about selecting a server if there are | // TODO: We could tell the browser about all the servers and let it | ||||
| // multiple options available. | // do random reconnects to improve reliability. | ||||
| shuffle($servers); | |||||
| $server = head($servers); | $server = head($servers); | ||||
| $client_uri = $server->getWebsocketURI(); | $client_uri = $server->getWebsocketURI(); | ||||
| Javelin::initBehavior( | Javelin::initBehavior( | ||||
| 'aphlict-listen', | 'aphlict-listen', | ||||
| array( | array( | ||||
| 'websocketURI' => (string)$client_uri, | 'websocketURI' => (string)$client_uri, | ||||
| ▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines | |||||