Hi,
i have to call Stop(); on [FUdpSocketReceiver][1] at the end of game. Because if i dont stop Receiver, he don’t unlock UDP port for another connection.
Component is attached to defaultPawn. I already tried [DestroyComponent][2] :

,
It doesn’t work, i try to print UELOG, but nothing, so DestroyComponent is newer called. Is there any way to call Stop(); before the end of the game?
I just fixed it.
UUDPReceiver::~UUDPReceiver() {
if (Socket != nullptr) {
Socket->Close();
}
if (UDPReceiver != nullptr) {
UDPReceiver->Stop();
}
}
Important thing is UUDPReceiver::~UUDPReceiver() ~ is sign for destructor!
Declaration in .h is ~UUDPReceiver() (name of class is UUDPReceiver!)
To unlock port you have to use Socket->Close() to close socket and connection. UDPReceiver->Stop() only stop thread.