Giter Club home page Giter Club logo

Comments (6)

kindermoumoute avatar kindermoumoute commented on August 24, 2024

Same issue here, when sending a message through RTM with the the following code:

rtm.SendMessage(rtm.NewOutgoingMessage(mytext, IDchannel))

The RTM event I receive:

event.type: "outgoing_error"
event.data: write tcp 10.0.0.212:57025->54.172.82.211:443: i/o timeout

EDIT:
There is not the issue when using this code:

api.PostMessage(IDchannel, mytext,slack.PostMessageParameters{AsUser: true})

from slack.

ignat avatar ignat commented on August 24, 2024

Worked fine before, but started a few days ago. This code:

rtm.SendMessage(rtm.NewTypingMessage(event.Channel))

now results in i/o timeout and disconnect:

OutgoingError: write tcp 172.*.*.*:41407->54.225.22.47:443: i/o timeout
Disconnected: intentional false
IncomingError: read tcp 172.*.*.*:41407->54.225.22.47:443: use of closed network connection

Looks like RTM hits some new rate limits, and Slack closes connection. I had to turn off typing notifications. api.PostMessage works fine.

from slack.

favoretti avatar favoretti commented on August 24, 2024

So I'm using this wrapper for the bot, which uses rtm.SendMessage: https://github.com/BeepBoopHQ/go-slackbot/blob/master/bot.go#L116, this one times out regularly. @ignat you're saying if I replace that with api.PostMessage it would work?

That's cool, I'm just curious what we can do for this lib to fix RTM as well.

from slack.

nlopes avatar nlopes commented on August 24, 2024

I think this is related with nlopes@b7940f2.

I'm reverting until I have some time to look into these issues.

from slack.

favoretti avatar favoretti commented on August 24, 2024

Reverted branch works well indeed.

from slack.

mbrevoort avatar mbrevoort commented on August 24, 2024

I can confirm that this commit caused the problem: nlopes@8955910

Also, it seems that we're attempting to set the write deadline on the PING only where in actuality when using SetWriteDeadline it affects any writes thereafter on the current connection.

So there are two issues:

  • the one second deadline is too short
  • SetWriteDeadline should probably be moved to ManageConnection()

I just submitted this PR #102 to resolves these issues.

from slack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.