mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-23 08:09:54 +01:00
Flush the output stream after writing.
This commit is contained in:
@@ -24,6 +24,7 @@ abstract class DuplexTest {
|
|||||||
try {
|
try {
|
||||||
PrintStream out = new PrintStream(d.getOutputStream());
|
PrintStream out = new PrintStream(d.getOutputStream());
|
||||||
out.println(CHALLENGE);
|
out.println(CHALLENGE);
|
||||||
|
out.flush();
|
||||||
System.out.println("Sent challenge: " + CHALLENGE);
|
System.out.println("Sent challenge: " + CHALLENGE);
|
||||||
Scanner in = new Scanner(d.getInputStream());
|
Scanner in = new Scanner(d.getInputStream());
|
||||||
if(in.hasNextLine()) {
|
if(in.hasNextLine()) {
|
||||||
@@ -58,6 +59,7 @@ abstract class DuplexTest {
|
|||||||
if(CHALLENGE.equals(challenge)) {
|
if(CHALLENGE.equals(challenge)) {
|
||||||
PrintStream out = new PrintStream(d.getOutputStream());
|
PrintStream out = new PrintStream(d.getOutputStream());
|
||||||
out.println(RESPONSE);
|
out.println(RESPONSE);
|
||||||
|
out.flush();
|
||||||
System.out.println("Sent response: " + RESPONSE);
|
System.out.println("Sent response: " + RESPONSE);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Incorrect challenge");
|
System.out.println("Incorrect challenge");
|
||||||
|
|||||||
Reference in New Issue
Block a user