skype-java-api
skype-java-api copied to clipboard
Skype.isRunning() work not correctly
- Run java app.
- Run skype.
- Wait till skype loaded all contacts(we can even wait for 5 minutes).
- Check from Java app Skype.isRunning().
- Check Skype.isRunning() return false.
- Check Skype.isRunning() return true.
Some problem inside Connector classe private void assureAttached() throws ConnectorException { Status attachedStatus = getStatus(); if (attachedStatus != Status.ATTACHED) { attachedStatus = connect(); if (attachedStatus != Status.ATTACHED) { throw new NotAttachedException(attachedStatus); } } } , because after restarting of client the attachedStatus=API_AVAILABLE and after connect() it is also attachedStatus=API_AVAILABLE and than we are throwing exception com.skype.connector.NotAttachedException. But after next run of Connector.assureAttached() the attachedStatus=ATTACHED.
I haven't gone deep into the sources so I see two solutions:
- In Connector.isRunning() don't catch exception and return FALSE, but rethrow exception like in LinuxConnector.isRunning(). So I as developer can catch this exception in the code and deal with it(make one more call or smth like this).
- In Connector.assureAttached() make third call of connect():), perhaps it will update "attachedStatus" to correct one.
ENVIRONMENT: Windows 7 32-bit, Windows 7 64-bit, Skype 6.1.0.129.