If a disconnection occurs, the sent_headers would still be set to true, and when a reconnect occurs, it would not send the headers again.
@@ -264,6 +264,7 @@ static void *send_thread(void *data)
}
stream->active = false;
+ stream->sent_headers = false;
return NULL;