Fix closed channel

This commit is contained in:
c0re100 2022-02-01 03:17:59 +08:00
parent cc7712e2c4
commit a7ee5501e3
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF

View file

@ -165,8 +165,7 @@ func (client *Client) Send(req Request) (*Response, error) {
response.Data = bytes.Replace(response.Data, []byte(strconv.FormatInt(m.Id, 10)), []byte(strconv.FormatInt(m2.Message.Id, 10)), 1)
return response, nil
case <-time.After(1 * time.Second):
client.successMsgStore.Delete(m.Id)
close(successCatcher)
return response, nil
}
}
}