Commit 75e3601 1 parent 8feab6f commit 75e3601 Copy full SHA for 75e3601
File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,4 @@ VLCPort = 9090
28
28
[Other ]
29
29
# Milliseconds between checking console.log and VLC Media Player's status, recommended values range from 100 to 1000
30
30
# Values above 1000 will be clamped to prevent issues with communicating to VLC
31
- RefreshMilliseconds = 200
31
+ RefreshMilliseconds = 400
Original file line number Diff line number Diff line change @@ -99,6 +99,11 @@ async function readNewLines() {
99
99
const streamData = await readStreamAsText ( conLogFileHandle . readable , "utf-8" ) ;
100
100
fileSize += streamData . size ;
101
101
const lines = streamData . text . split ( config . TF2 . LinuxLineEndings ? "\n" : "\r\n" ) ;
102
+ getCVARAsBool ( "sv_alltalk" ) . then ( ( isAlltalk ) => {
103
+ isAlltalkEnabled = isAlltalk ;
104
+ } ) . catch ( ( ) => {
105
+ isAlltalkEnabled = false ;
106
+ } ) ;
102
107
if ( streamData . size === 0 ) {
103
108
return ;
104
109
}
@@ -108,7 +113,6 @@ async function readNewLines() {
108
113
}
109
114
for ( let i = 0 ; i < lines . length ; i ++ ) {
110
115
if ( lines [ i ] . startsWith ( "(Demo Support) Start recording demos" , ) ) {
111
- isAlltalkEnabled = await getCVARAsBool ( "sv_alltalk" ) ;
112
116
/*TF2 has a bug where if you disconnect while using the voice chat the client will think it's still speaking
113
117
fixing this using +voicerecord;-voicerecord when joining*/
114
118
sendTF2Command ( "+voicerecord;-voicerecord" ) ;
@@ -210,7 +214,12 @@ async function checkMetaData() {
210
214
try {
211
215
response = await fetch ( `http://:${ VLCPassword } @127.0.0.1:${ config . VLC . VLCPort } /requests/status.xml${ nextCommand } ` ) ;
212
216
} catch ( e ) {
213
- return false ;
217
+ // Occurs when it's been too long since the last fetch... ???
218
+ if ( e . message . includes ( "An existing connection was forcibly closed by the remote host." ) ) {
219
+ return false ;
220
+ } else {
221
+ throw e ;
222
+ }
214
223
} finally {
215
224
VLCCommandQueue . shift ( ) ;
216
225
}
You can’t perform that action at this time.
0 commit comments