Skip to content

[AI] Fix ThreadedServerWorkflowExecutor with DTLS protocols #222

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 26, 2025

Summary

  • Added validation to prevent ThreadedServerWorkflowExecutor from being used with DTLS protocols
  • Throws informative UnsupportedOperationException when attempting to use THREADED_SERVER executor with DTLS
  • Added comprehensive unit tests to verify the fix

Background

The ThreadedServerWorkflowExecutor uses TCP sockets which are incompatible with UDP-based DTLS protocols. Java's DatagramSocket API doesn't support spawning new sockets for each client connection, making the threaded executor model unsuitable for DTLS.

Changes

  1. Modified WorkflowExecutorFactory.createWorkflowExecutor() to check if THREADED_SERVER is being used with DTLS protocols
  2. Added informative error message directing users to use the DTLS executor instead
  3. Created WorkflowExecutorFactoryTest with tests covering all executor types and the new validation

Test plan

  • Unit tests pass for all executor types
  • ThreadedServerWorkflowExecutor works normally with TLS protocols
  • Attempting to use ThreadedServerWorkflowExecutor with DTLS throws expected error
  • Error message provides clear guidance to users
  • Code formatted with spotless

Fixes #184

Add validation to prevent ThreadedServerWorkflowExecutor from being used with DTLS protocols.
Since Java's DatagramSocket API doesn't support spawning new sockets for each client connection,
the threaded executor model is incompatible with UDP-based DTLS.

The fix adds a check in WorkflowExecutorFactory to throw an informative error message when
THREADED_SERVER executor type is used with DTLS protocols, directing users to use the
DTLS executor instead.

Fixes #184
@ic0ns ic0ns changed the title Fix ThreadedServerWorkflowExecutor with DTLS protocols [AI] Fix ThreadedServerWorkflowExecutor with DTLS protocols Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ThreadedServerWorkflowExecutor with DTLS 1.2
1 participant