Skip to content

Commit

Permalink
Potential fix for plugin when added by UE marketplace.
Browse files Browse the repository at this point in the history
  • Loading branch information
KGronek-Pubnub committed Sep 30, 2024
1 parent b9adf2d commit a28e5d4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Source/PubnubLibrary/Private/PubnubSubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ void UPubnubSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
Super::Initialize(Collection);

//Create new threads - separate for subscribe and all other operations
QuickActionThread = new FPubnubFunctionThread;
LongpollThread = new FPubnubLoopingThread;

//Load all settings from plugin config
LoadPluginSettings();
if(PubnubSettings->InitializeAutomatically)
Expand All @@ -42,6 +38,16 @@ void UPubnubSubsystem::Deinitialize()

void UPubnubSubsystem::InitPubnub()
{
if(IsInitialized)
{
PubnubError("Pubnub is already initialized", EPubnubErrorType::PET_Warning);
return;
}

//Create new threads - separate for subscribe and all other operations
QuickActionThread = new FPubnubFunctionThread;
LongpollThread = new FPubnubLoopingThread;

if(!CheckQuickActionThreadValidity())
{return;}

Expand Down

0 comments on commit a28e5d4

Please sign in to comment.