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

[BUG] v3.4.2 TCP/UDP Remote still listening even when switched off #3097

Open
2 tasks done
VideoBSO opened this issue Oct 21, 2024 · 1 comment
Open
2 tasks done

[BUG] v3.4.2 TCP/UDP Remote still listening even when switched off #3097

VideoBSO opened this issue Oct 21, 2024 · 1 comment
Labels
area/protocol BUG Something isn't working

Comments

@VideoBSO
Copy link

Is this a bug in companion itself or a module?

  • I believe this to be a bug in companion

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When a connection for TCP (or UDP) remot has been establichsed and the switch for that remote ist turned off, the module is still listening to commands coming from the same connection.

Steps To Reproduce

I tried to reduce it to a minimal example:

  • active module is pulse Barco
  • TCP commands are sent by Christie Pandoras Box (but this really should be irrelevant who is talking to companion)
  • sent command is LOCATION 6/0/1 PRESS

Here is the logs (cleared off the instance logs of the pulse module)

Date,Module,Type,Log
2024-10-21T14:17:04.481Z,Data/UserConfig,info,set 'udp_enabled' to: true
2024-10-21T14:17:04.483Z,Service/Udp,info,Listening on port 16759
2024-10-21T14:17:05.409Z,Data/UserConfig,info,set 'tcp_enabled' to: true
2024-10-21T14:17:05.410Z,Service/Tcp,info,Listening on port 16759
2024-10-21T14:17:11.598Z,Service/Api,info,Got location press at 6/0/1 (bank:pIXNy1ZHR0eEoDas-SVAf)
2024-10-21T14:17:11.623Z,Service/Api,info,Auto releasing 6/0/1 (bank:pIXNy1ZHR0eEoDas-SVAf)
2024-10-21T14:17:26.510Z,Data/UserConfig,info,set 'udp_enabled' to: false
2024-10-21T14:17:26.511Z,Service/Udp,info,Stopped listening on port 16759
2024-10-21T14:17:27.498Z,Data/UserConfig,info,set 'tcp_enabled' to: false
2024-10-21T14:17:27.498Z,Service/Tcp,info,Stopped listening on port 16759
2024-10-21T14:17:35.131Z,Service/Api,info,Got location press at 6/0/1 (bank:pIXNy1ZHR0eEoDas-SVAf)
2024-10-21T14:17:35.153Z,Service/Api,info,Auto releasing 6/0/1 (bank:pIXNy1ZHR0eEoDas-SVAf)

Expected Behavior

Expected behaviour would be that when switched off, commands recieved by this remote connection would be ignored.

Environment (please complete the following information)

  • OS: CompanionPi
  • Browser: Microsoft Edge 109
  • Companion Version: 3.4.2+7335-stable-fc3fe2f0

Additional context

I could try to send the command from a different connection, but I suppose, that this really is irrelevant.

@VideoBSO VideoBSO added the BUG Something isn't working label Oct 21, 2024
@VideoBSO
Copy link
Author

I wrote this litte deno script to test if it is something weird Pandoras Box was doing, but it is the same:

const encoder = new TextEncoder();

const conn = await Deno.connect({
  hostname: "10.0.254.1",
  port: 16759,
  transport: "tcp",
});

setInterval(() =>  {
  conn.write(encoder.encode("LOCATION 1\/2\/5 PRESS\n"));
}, 2000);

One thing I learned from this though, that it only affects existing connections. New connections are not established, when the listener is off.
So I guess the fix should possibly be, that switching off the listener should terminate any existing connection..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/protocol BUG Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants