This changes the behaviour of the rosPubMsg console command slightly, such that it is a bit more robust against "incorrect" orders of invocation, players not being in a vehicle, pipes not being open, etc.
It's still possible to end up in a state where FS must be shut down, but it's a bit harder to get there now.
Especially the open->close->open->... cycle was broken before 73e8c18: calling close() on an FD apparently doesn't also nil it, so all the checks for file_pipe == nil failed without explicitly nilling it.
This changes the behaviour of the
rosPubMsg
console command slightly, such that it is a bit more robust against "incorrect" orders of invocation, players not being in a vehicle, pipes not being open, etc.It's still possible to end up in a state where FS must be shut down, but it's a bit harder to get there now.
Especially the
open->close->open->...
cycle was broken before 73e8c18: callingclose()
on an FD apparently doesn't alsonil
it, so all the checks forfile_pipe == nil
failed without explicitlynil
ling it.