When I use get_data() in a StreamPeer the Status of StreamPeerTCP goes from Conected to None. Any Ideas why?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Gamemap

I am trying to connect to a prosody server (xmpp protocol) with StreamPeerTCP. I can use put_data() to send data to the server, but when I use get_data() I get the data with an error code 0 (OK) and the StreamPeerTCP Node changes its status from Connected (2) to None (0).

Can you tell me why this hapens? (and how to avoid it?)

Does the StreamPeerTCP disconnects after getting all data with StreamPeerTCP.get_data(StreamPeerTCP.get_available_bytes())?