Commit 71b034a0 authored by Nicolas Fella's avatar Nicolas Fella

Fix packet loss after connection

parent 0e9dd251
......@@ -421,6 +421,8 @@ public class Device implements BaseLink.PacketReceiver {
public void addLink(NetworkPacket identityPacket, BaseLink link) {
//FilesHelper.LogOpenFileCount();
links.add(link);
link.addPacketReceiver(this);
this.protocolVersion = identityPacket.getInt("protocolVersion");
......@@ -448,9 +450,6 @@ public class Device implements BaseLink.PacketReceiver {
}
}
links.add(link);
try {
SharedPreferences globalSettings = PreferenceManager.getDefaultSharedPreferences(context);
byte[] privateKeyBytes = Base64.decode(globalSettings.getString("privateKey", ""), 0);
......@@ -499,7 +498,6 @@ public class Device implements BaseLink.PacketReceiver {
supportedPlugins = new Vector<>(PluginFactory.getAvailablePlugins());
}
link.addPacketReceiver(this);
reloadPluginsFromSettings();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment