Ticket #527 (new defect)

Opened 2 years ago

Last modified 2 years ago

Simultaneous logins to one account should be made impossible by locking

Reported by: sjors Owned by:
Priority: major Milestone: kmess-3.0
Component: Other Version: 2.0
Keywords: Cc:

Description

Currently, it's possible to log into an account that another KMess instance is connected to on the same machine. Apart from that MSNP<18 doesn't allow this and will disconnect the other KMess instance, this may cause problems like both instances editing the same files, corrupting it. KMess should lock an account when logging into it, and unlock properly when it quits; it should also be able to detect if an account is locked and if the lock is stale. If a lock is found and it isn't stale, KMess should give an error and not log in, even when autoconnect is specifically enabled.

Change History

Changed 2 years ago by fontknocker

We can do this with a lock file in the account directory. Have kmess "touch" the file at a fixed interval (once every X minutes). Upon startup, test the last access time of the file and if it's older than X minutes consider the lock stale and remove.

Note: See TracTickets for help on using tickets.