Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
add debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
bootjp committed Jul 16, 2020
1 parent c2e5f84 commit 4c2b6b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vrc_auto_rejoin_tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (v *VRCAutoRejoinTool) fetchLatestLogName(path string) (string, error) {
func (v *VRCAutoRejoinTool) processWatcher() {

for range v.done {
fmt.Println("processWatcher")
log.Println("process watcher available")
_, err := v.findProcessPIDByName("VRChat.exe")
if err == ErrProcessNotFound {
if v.Config.EnableRejoinNotice {
Expand All @@ -422,10 +422,10 @@ func (v *VRCAutoRejoinTool) processWatcher() {
if err != nil {
log.Println(err)
}
time.Sleep(30 * time.Second)
v.lock.Unlock()
log.Println("process watcher cleanup")
close(v.done)
v.running = false
v.lock.Unlock()
return
}
time.Sleep(10 * time.Second)
Expand All @@ -436,7 +436,6 @@ func (v *VRCAutoRejoinTool) processWatcher() {
func (v *VRCAutoRejoinTool) logInspector(tail *tail.Tail, at time.Time) {

for msg := range tail.Lines {
fmt.Println("log Watcher")
text := msg.Text
nInstance, err := v.moved(at, text)
if err == ErrNotMoved {
Expand Down Expand Up @@ -487,6 +486,7 @@ func (v *VRCAutoRejoinTool) logInspector(tail *tail.Tail, at time.Time) {
log.Println(err)
}

log.Println("log Watcher clean up")
v.running = false
close(v.done)
v.lock.Unlock()
Expand Down

0 comments on commit 4c2b6b2

Please sign in to comment.