missed a lock

This commit is contained in:
farhan 2020-11-18 12:53:25 -05:00
parent ad893eaec9
commit 4cead30ea5

View File

@ -24,7 +24,9 @@ func PollMastodonPleroma(endpoint string, reportPostChan chan ReportPost) {
http_client := http.Client{Timeout: 5 * time.Second} http_client := http.Client{Timeout: 5 * time.Second}
for { for {
ri_mutex.Lock()
m := runninginstances[endpoint] m := runninginstances[endpoint]
ri_mutex.Unlock()
api_timeline := "https://" + endpoint + "/api/v1/timelines/public?limit=40&min_id=" + min_id api_timeline := "https://" + endpoint + "/api/v1/timelines/public?limit=40&min_id=" + min_id
resp, err := http_client.Get(api_timeline) resp, err := http_client.Get(api_timeline)