This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
yenon's profile picture

[1.7.10][CC 1.75][SSP/SMP] Networked peripherals not disconnecting

Started by yenon, 01 March 2016 - 09:49 PM
yenon #1
Posted 01 March 2016 - 10:49 PM
Description:
I couldn't find this bug listed anywhere, so here goes nothing.
Every time a networked peripheral is removed by mining the peripheral itself, it never diconnects and still returns true when peripheral.isPresent is called.
Also, no peripheral_detach event is being fired.

Expected Result:
The peripheral should be disconnected from the network and fire a peripheral_detach event.
Also, peripheral.isPresent should return false. Maybe remove the device from the network device list too, if that is possible. (Maybe reassign the peripheral id to new devices?)

Reproduction Steps:
Build a small network (eg. a single Computer and Disk Drive connected with modems and cable, both modems turned on) and detach the Disk Drive by breaking it without touching the modem (still turned on). Both Disk Drive and Modem break and the peripheral is still in the network.

Additional Info:
I could reproduce the bug in both creative and survival, but both times with cheated devices.
Additionally, i reproduced it on my server too.
KingofGamesYami #2
Posted 02 March 2016 - 01:47 AM
I believe this is a duplicate of this issue.
Silver07 #3
Posted 04 March 2016 - 04:47 AM
I have noticed an issue where right clicking a modem it says
"computer_1 disconnected from network"
and for some reason its still able to receive rednet signals
its supposed to act unplugged.

And yes phantom peripherals annoy me.

And i don't understand why monitors don't clear when disconnected or the computer is shutdown or rebooted.
Edited on 04 March 2016 - 03:48 AM
Bomb Bloke #4
Posted 04 March 2016 - 05:49 AM
I have noticed an issue where right clicking a modem it says
"computer_1 disconnected from network"
and for some reason its still able to receive rednet signals
its supposed to act unplugged.

When you connect / disconnect wired modems (by "activating" them, as opposed to physically adding / removing cables), all you're doing is messing with your ability to communicate with remote peripherals. Rednet / modem messages can be received so long as modem/rednet.open() has been correctly called.

You'll notice wired modems have TWO rings - a large one (around their larger edge, which lights up red when they're ready to receive message traffic), and a smaller one (around where the cable connects to them, which lights up red when they're ready to share peripherals).

And i don't understand why monitors don't clear when disconnected or the computer is shutdown or rebooted.

Because peripherals are their own things, not beholden to the computers they're attached to. For example, you can connect two computers to one monitor at the same time and make it do stuff… but it's the monitor that actually draws the stuff, not the computers attached to it.

If that doesn't make sense to you, just think of 'em as SSDs - Solid State Displays. ;)/>
Edited on 04 March 2016 - 04:52 AM