Skip to content

Fix worker crash when using custom SMTP provider #7915

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

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

stnguyen90
Copy link
Contributor

@stnguyen90 stnguyen90 commented Apr 3, 2024

What does this PR do?

Due to a bug in the Swoole TCP hook, the worker crashes when doing the TLS handshake. This PR disables the Swoole TCP hook just like we do in the mails worker.

Fixes: #7914

Test Plan

Manually created an email and the logs show it was processed successfully:

appwrite-worker-messaging  | [Worker] Worker 0 is ready!
appwrite-worker-messaging  | Worker messaging  started
appwrite-worker-messaging  | [Job] Received Job (660dbf5c37b395.78058781).
appwrite-worker-messaging  | [Job] (660dbf5c37b395.78058781) successfully run.
appwrite-worker-messaging  | [Job] Received Job (660dc049d8a217.47574305).
appwrite-worker-messaging  | [Job] (660dc049d8a217.47574305) successfully run.

The Console also shows success for the email:

image

Note: the SMS failed, but that's because of the provider returned an error message. This is still good because it proves API calls still send as expected.

Related PRs and Issues

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

Due to a bug in the Swoole TCP hook, the worker crashes when doing the
TLS handshake. This PR disables the Swoole TCP hook just like we do
in the mails worker.

References:
* #7914
* #6966
* swoole/swoole-src#4909
@stnguyen90 stnguyen90 linked an issue Apr 3, 2024 that may be closed by this pull request
2 tasks
@stnguyen90 stnguyen90 self-assigned this Apr 3, 2024
@stnguyen90 stnguyen90 added the product / messaging Fixes and upgrades for the Appwrite Messaging. label Apr 3, 2024
@stnguyen90 stnguyen90 requested a review from abnegate April 3, 2024 20:52
@stnguyen90 stnguyen90 marked this pull request as ready for review April 4, 2024 00:28
@stnguyen90 stnguyen90 requested a review from abnegate April 4, 2024 14:27
@abnegate abnegate merged commit 6ff81bc into 1.5.x Apr 8, 2024
21 checks passed
@abnegate abnegate deleted the fix-7914-custom-smtp-messaging-error branch April 8, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product / messaging Fixes and upgrades for the Appwrite Messaging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Custom SMTP doesn't work for messaging
2 participants