question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sockets do not accept more than one plug

See original GitHub issue

Hi, currently sockets do not accept more than one plug. However, I would like to be able to connect several plugs to a socket (e.g. for routing MIDI messages). I found an if statement in the accepts method of the SocketItem class (line 1833) which returns False if more than one plug is connected. However, uncommenting the corresponding line does not seem to do the trick. Can you give me a hint which lines of code I have to change?

Best, Hanno

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
morganloomiscommented, Jun 20, 2018

This would be a nice feature so long as it could be enabled or disabled by an argument when creating a socket.

0reactions
p0lascommented, Jun 28, 2018

a quick and dirty solution is to comment out a few lines in the SlotItem.connect method.

#        if len(self.connected_slots) > 0:
#            # Already connected.
#            self.connections[0]._remove()
#            self.connected_slots = list()

without that sockets are like plugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What happens when too many appliances are plugged into ...
The danger of connecting too many plug connections in one socket are that the socket can chance a risk of getting overloaded, and...
Read more >
Accept multiple subsequent connections to socket
This works fine for the first request but the listener does not accept subsequent new requests. My question is: If I have sock=accept(listener,( ......
Read more >
Don't overload your home's outlets
Never plug more than two appliances into an outlet at once or “piggyback” extra appliances on extension cords or wall outlets. Use only...
Read more >
Overloaded Outlet: How Many Things Can I Plug Into One ...
An overloaded outlet places you at greater risk of a house fire. Here's how many devices you can plug into one outlet.
Read more >
Overloading Sockets
Use a multi-way bar extension lead rather than a block adaptor, as this will put less strain on the wall socket. Some block...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found