Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pidgin freezes on message sending #95

Closed
lazyest opened this issue Nov 4, 2021 · 2 comments
Closed

pidgin freezes on message sending #95

lazyest opened this issue Nov 4, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Someone else is free to do this wontfix This will not be worked on

Comments

@lazyest
Copy link

lazyest commented Nov 4, 2021

Maybe its only me is so slow-connected but every message freezes whole pidgin to couple of seconds. Its not critical but annoying that everything else on Pidgin is waiting. Maybe there is a quite simple way of sending as separate thread or something?

@hoehermann
Copy link
Owner

This is, unfortunately, by design. Pidgin uses blocking calls to send messages. The plug-in needs quite some time to determine if the message has been sent successfully or not. Only then Pidgin can continue by putting the message into the conversation or log the error. There also was some discussion in #72 and #66 on how to handle this.

Since go-whatsapp is based on go, using a separate thread is indeed very simple. However, this would mean Pidgin would think all messages are sent instantaneously. In case an error occurs, this would be detected only after Pidgin regarded the message as "sent successfully". That would mess up logs and I do not even want to think about what happens to non Pidgin-clients like bitlbee and spectrum.

There there seems to be no solution which will make everyone happy. For this reason, I live with the freeze as that is what Pidgin expects.

If someone wants to implement asynchronous sending (non-destructively, user-configurable, disabled by default), pull requests are welcome. With the lingering threat of having to do a complete rewrite because of #90, I have no interest on adding this feature myself.

@hoehermann hoehermann added enhancement New feature or request help wanted Someone else is free to do this wontfix This will not be worked on labels Nov 4, 2021
@hoehermann
Copy link
Owner

The re-write with whatsmeow has been completed. Messages are now sent asynchronously, delighting some users while irritating others. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Someone else is free to do this wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants