TorPlugin socket timeout
There is a socket timeout in the Tor plugin, after 30 seconds of inactivity, that prevents user from communicating more than once over the mobile network. Connection between the devices is not re-established.
- Two devices with connected contacts, A and B
- Using only the mobile network, A chats with B and vice versa.
- Close Briar and "lock" both devices by pressing the power button (don't turn off).
- Unlock both devices after ~60 seconds (I think the timeout is set at 30 seconds) and try to chat with both A and B. Notice that no messages will be received by the other user and the "clock" symbol remains indefinitely in place.
You can re-establish connection by turning on WiFi on both devices or bluetooth and notice that then the messages are sent instantly.
Following is the error message that I got:
java.net.SocketTimeoutException at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488) at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) at org.briarproject.crypto.StreamDecrypterImpl.readFrame(StreamDecrypterImpl.java:57) at org.briarproject.transport.StreamReaderImpl.readFrame(StreamReaderImpl.java:61) at org.briarproject.transport.StreamReaderImpl.read(StreamReaderImpl.java:49) at org.briarproject.sync.PacketReaderImpl.readPacket(PacketReaderImpl.java:54) at org.briarproject.sync.PacketReaderImpl.eof(PacketReaderImpl.java:78) at org.briarproject.sync.IncomingSession.run(IncomingSession.java:56) at org.briarproject.plugins.ConnectionManagerImpl$ManageIncomingDuplexConnection.run(ConnectionManagerImpl.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)