If a slave that is already connected attempts connecting the existing
connection for that slave is disconnected. The most common scenario for
this is that the existing connection is stale and the slave is
attempting to connect agan. However if the connection is stale then the
disconnection will take 15 minutes to time out and the slave will appear
unresponsive during this time. Fix this problem by setting the timeout
to 15 seconds before disconnecting the existing connection.
Fix WebSocketClientConnector not sending the send buffer queued up
between starting the connection and the master server sending the ready
signal for it.
Listen for the close event and connect again if the connection was
closed from proper disconnect or initiate a shutdown if the connection
was unexpectedly closed. Unexpected closure happens from authentication
failure and if a connection fails to reconnect before the timeout.
Implement notification to plugins for disconnect request, connect, drop,
and close. This allows plugins to properly handle slaves and the master
server shutting down without sending messages that will get lost.
Fix missing module declarations, broken lings, broken formating and
incorrect scopes in the documentation. For modules split over several
files it appears the only viable option is to use the memberof directive
on each documented member and only declare the index file as a module.
Send a mapping of the plugins the master server has loaded to slaves
vice versa. Limit the plugins that may be loaded by instances to only
those that the master server has loaded.
Fix crash when technologiy level stored on the master is greater than
the max_level for the technology in Factorio. This can happen with mods
that for example reduce the max_level from inifity to a finite level.
Fix research_sync sending out contribution events for the previous level
of a researched technology and sending finished events for the wrong
level when synchronizing technologies. Both of these issues are related
to failing to accunt for the unlocked level being one less than the
level stored when the researched property is false.
Fix log spam when the dole distribution method is used on
subspace_storage plugin. This was caused by a bogus if condition being
translated into a sensible but wrong one.
Fix integration tests using the default certificate paths instead of
having them located in the dedicated test database directory. Also
increment key size to the minimum allowed of 1024.
Add config entry for the number of bits to use in the auto generate TLS
certificate for the master server and reduce it to 512 for the
integration test. This reduces the time needed to generate the
certificate in the integration test.
Ensure that the replay is disabled after the game is patched by calling
game.disable_replay(). It's not possible to replay a patched save, and
it also stores every command sent into save, causing it to quickly grow
into an unplayably large size.