Following code below should reconnect my audio server if it was found to be disconnected now all is good the timer event is called and the system message shows its reconnecting however it seams the connect procedure fails to be called as it dont reconnect.
procedure TGizletView.AudioConTimerTimer(Sender: TObject);
begin
AudioConTimer.Enabled := False;
AddSystemMessage('Reconnecting to MCP...', SFontDialog);
ConnectToAudioServer('ADDR', 'PORT', 'PASSWORD');
end;
code below is were it fails.
procedure TGizletView.ConnectToAudioServer(const IP, Port, Key: String);
begin
AudioClient.srvMasterkey := Key;
AudioClient.connect(UserID, RoomID, IP, Port);
end;
it seams it not able to be called yet if I do same code as a tbutton it would work fine if pressed, anyone got anyone got ideas why would this be happening??
Thanks