Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AmarnathCJD committed Mar 19, 2024
1 parent 2127995 commit a53e425
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion mtproto.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,11 @@ messageTypeSwitching:
m.Logger.Debug("RPC response: " + fmt.Sprintf("%T", obj))
err := m.writeRPCResponse(int(message.ReqMsgID), obj)
if err != nil {
return errors.Wrap(err, "writing RPC response")
if strings.Contains(err.Error(), "no response channel found") {
m.Logger.Error(errors.Wrap(err, "writing RPC response"))
} else {
return errors.Wrap(err, "writing RPC response")
}
}

case *objects.GzipPacked:
Expand Down
4 changes: 2 additions & 2 deletions telegram/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func NewCache(logLevel string, fileN string) *CACHE {

// --------- Cache file Functions ---------
func (c *CACHE) WriteFile() {
//c.Lock()
//defer c.Unlock() // necessary?
c.Lock()
defer c.Unlock() // necessary?

if c.file == nil {
var err error
Expand Down

0 comments on commit a53e425

Please sign in to comment.