minolin / acplugins

R&D about the upcoming server plugin infrastrucure of Assetto Corsa, driving simulator by Kunos simulazioni
Apache License 2.0
18 stars 4 forks source link

Disconnect blocks Exception on acsp_version differences #18

Closed minolin closed 8 years ago

minolin commented 8 years ago

if (this.ProtocolVersion != RequiredProtocolVersion) { this.Disconnect(); throw new Exception(string.Format("AcServer protocol version '{0}' is different from the required protocol version '{1}'. Disconnecting...", this.ProtocolVersion, RequiredProtocolVersion)); }

Disconnect() won't happen, so no Exception is thrown. Blocking line:

_processMessagesThread.Join(); // make sure thread has terminated

Ideas?

flitzi commented 8 years ago

Oops, sorry. I created a deadlock. I will commit a fix shortly.

minolin commented 8 years ago

Could be solved by a timeout like

_processMessagesThread.Join(4000)

Edit: If you have problem finding the root of the problem, is pretty cheap

flitzi commented 8 years ago

OK, I've committed a fix, but not yet tested. If there are still Problems, please reopen issue.