@@ -162,11 +162,11 @@ public function newEvent(GSEvent $event): string {
162162 * @param GSWrapper $wrapper
163163 * @param string $protocol
164164 */
165- public function broadcastWrapper (GSWrapper $ wrapper, string $ protocol ): void {
165+ public function broadcastWrapper (GSWrapper $ wrapper ): void {
166166 $ status = GSWrapper::STATUS_FAILED ;
167167
168168 try {
169- $ this ->broadcastEvent ($ wrapper ->getEvent (), $ wrapper ->getInstance (), $ protocol );
169+ $ this ->broadcastEvent ($ wrapper ->getEvent (), $ wrapper ->getInstance ());
170170 $ status = GSWrapper::STATUS_DONE ;
171171 } catch (RequestContentException | RequestNetworkException | RequestResultSizeException | RequestServerException | RequestResultNotJsonException $ e ) {
172172 }
@@ -192,7 +192,7 @@ public function broadcastWrapper(GSWrapper $wrapper, string $protocol): void {
192192 * @throws RequestResultSizeException
193193 * @throws RequestServerException
194194 */
195- public function broadcastEvent (GSEvent $ event , string $ instance, string $ protocol = '' ): void {
195+ public function broadcastEvent (GSEvent $ event , string $ instance ): void {
196196 $ this ->signEvent ($ event );
197197
198198 if ($ this ->configService ->isLocalInstance ($ instance )) {
@@ -202,12 +202,7 @@ public function broadcastEvent(GSEvent $event, string $instance, string $protoco
202202 $ path = $ this ->urlGenerator ->linkToRoute ('circles.GlobalScale.broadcast ' );
203203 $ request = new NC19Request ($ path , Request::TYPE_POST );
204204 $ this ->configService ->configureRequest ($ request );
205- $ protocols = ['https ' , 'http ' ];
206- if ($ protocol !== '' ) {
207- $ protocols = [$ protocol ];
208- }
209205 $ request ->setInstance ($ instance );
210- $ request ->setProtocols ($ protocols );
211206 }
212207
213208 $ request ->setDataSerialize ($ event );
@@ -235,14 +230,9 @@ public function confirmEvent(GSEvent &$event): void {
235230 $ path = $ this ->urlGenerator ->linkToRoute ('circles.GlobalScale.event ' );
236231
237232 $ request = new NC19Request ($ path , Request::TYPE_POST );
238- $ request ->basedOnUrl ($ owner ->getInstance ());
239233 $ this ->configService ->configureRequest ($ request );
234+ $ request ->basedOnUrl ($ owner ->getInstance ());
240235
241- if ($ this ->get ('REQUEST_SCHEME ' , $ _SERVER ) !== '' ) {
242- $ request ->setProtocols ([$ _SERVER ['REQUEST_SCHEME ' ]]);
243- } else {
244- $ request ->setProtocols (['https ' , 'http ' ]);
245- }
246236 $ request ->setDataSerialize ($ event );
247237
248238 $ result = $ this ->retrieveJson ($ request );
@@ -423,7 +413,6 @@ public function confirmCircleStatus(Circle $circle): bool {
423413 $ path = $ this ->urlGenerator ->linkToRoute ('circles.GlobalScale.status ' );
424414 $ request = new NC19Request ($ path , Request::TYPE_POST );
425415 $ this ->configService ->configureRequest ($ request );
426- $ request ->setProtocols (['https ' , 'http ' ]);
427416 $ request ->setDataSerialize ($ event );
428417
429418 $ requestIssue = false ;
0 commit comments