File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tools/SourceKit/tools/sourcekitd/bin/XPC/Service Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ std::string sourcekitd::getRuntimeLibPath() {
209
209
}
210
210
211
211
static void sourcekitdServer_peer_event_handler (xpc_connection_t peer,
212
- xpc_object_t event) {
212
+ xpc_object_t event) {
213
213
xpc_type_t type = xpc_get_type (event);
214
214
if (type == XPC_TYPE_ERROR) {
215
215
if (event == XPC_ERROR_CONNECTION_INVALID) {
@@ -305,6 +305,10 @@ static void sourcekitdServer_event_handler(xpc_connection_t peer) {
305
305
sourcekitdServer_peer_event_handler (peer, event);
306
306
});
307
307
308
+ // Update the main connection
309
+ xpc_retain (peer);
310
+ if (MainConnection)
311
+ xpc_release (MainConnection);
308
312
MainConnection = peer;
309
313
310
314
// This will tell the connection to begin listening for events. If you
You can’t perform that action at this time.
0 commit comments