Programmer245 / IS24-AM32

Software Engineering Project - Bachelor of Computer Engineering (PoliMi)
0 stars 0 forks source link

Incorrect handling of incoming messages, both from the server, and the client #91

Closed Programmer245 closed 5 months ago

Programmer245 commented 5 months ago

Currently, both the Client and Server nodes are run by threads, that listen for incoming messages. When a message is received, this same thread, executes the received message's method.

While this may not be a big problem server-side, due to the lack of user input, this is a big issue on the client side.

For example, when the client-side listener thread waiting for incoming messages in the receiveFromServer method of the SKClientNode receives a PlayerTurnMessage, it will call the uploadPlayerTurn method itself, preventing the client from receiving any more messages, until the thread terminates its method call.

Programmer245 commented 5 months ago

image

Programmer245 commented 5 months ago

Issue has been fixed client-side