firefly2442 / Arma2NETMySQLPlugin

Arma2NET plugin to connect to MySQL and SQLite databases
GNU General Public License v3.0
24 stars 9 forks source link

Bug After Long Periods of Inactivity #4

Closed firefly2442 closed 12 years ago

firefly2442 commented 12 years ago

This is the same problem that we had with the older version of this application. After long periods of inactivity (at least 12 hours), it throws an error:

Warning: 15:11:05 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine

This is probably because the connection stays open once callExtension is ran. To fix this, perhaps it would be good to use a thread and close the MySQL connection after 30 min. of inactivity or so. Then, if it needs to be used again, it will just reopen the connection as usual.

firefly2442 commented 12 years ago

Testing possible fix.

firefly2442 commented 12 years ago

Fixed. See hash: 0f8c36b432bb561288250dc93dd95969b1d233bc