@@ -73,6 +73,11 @@ SUBSYSTEM_DEF(plexora)
73
73
http_root = config[" ip" ]
74
74
http_port = config[" port" ]
75
75
76
+ default_headers = list (
77
+ " Content-Type" = " application/json" ,
78
+ " Authorization" = AUTH_HEADER ,
79
+ )
80
+
76
81
// Do a ping test to check if Plexora is actually running
77
82
if (! is_plexora_alive())
78
83
stack_trace (" SSplexora is enabled BUT plexora is not alive or running! SS has not been aborted, subsequent fires will take place." )
@@ -81,10 +86,6 @@ SUBSYSTEM_DEF(plexora)
81
86
82
87
RegisterSignal (SSticker, COMSIG_TICKER_ROUND_STARTING , PROC_REF (roundstarted))
83
88
84
- default_headers = list (
85
- " Content-Type" = " application/json" ,
86
- " Authorization" = AUTH_HEADER ,
87
- )
88
89
return SS_INIT_SUCCESS
89
90
90
91
/ datum / controller/ subsystem/ plexora/ Recover()
@@ -109,6 +110,7 @@ SUBSYSTEM_DEF(plexora)
109
110
var /datum /http_response/response = request. into_response()
110
111
if (response. errored)
111
112
plexora_is_alive = FALSE
113
+ log_admin (" Failed to check if Plexora is alive! She probably isn't. Check config on both sides" )
112
114
CRASH (" Failed to check if Plexora is alive! She probably isn't. Check config on both sides" )
113
115
else
114
116
var /list /json_body = json_decode(response. body)
@@ -209,7 +211,7 @@ SUBSYSTEM_DEF(plexora)
209
211
" id" = id
210
212
)
211
213
212
- var /datum /http_request/request = new (RUSTG_HTTP_METHOD_GET , " http://[ http_root] : [ http_port] /byondserver_alive" , json_encode(body))
214
+ var /datum /http_request/request = new (RUSTG_HTTP_METHOD_GET , " http://[ http_root] : [ http_port] /byondserver_alive" , json_encode(body), default_headers )
213
215
request. begin_async()
214
216
UNTIL_OR_TIMEOUT (request. is_complete(), 5 SECONDS )
215
217
var /datum /http_response/response = request. into_response()
0 commit comments