Make NetworkConnection send(T data) method synchronized
This commit is contained in:
parent
5054224653
commit
361037ab9a
|
@ -305,7 +305,7 @@ public class NetworkHandler {
|
|||
* @param data data object of type T to be submitted through the connection.
|
||||
* @throws IOException if an error occurs (e.g. connection interrupted while sending, ...)
|
||||
*/
|
||||
public void send(T data) throws IOException {
|
||||
public synchronized void send(T data) throws IOException {
|
||||
ObjectOutputStream outputStream = new ObjectOutputStream(socket.getOutputStream());
|
||||
outputStream.writeObject(data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue