Not sure if this is expected: when the wallet unlock times out, this can be in the middle of an operation, resulting in different errors,
<***> Ik zie zo een sendfrom
<***> [code] => -4
<***> [message] => Signing transaction failed
<***> Die komt regelmatig voor
<***> Deze ook, ook met sendfrom
<***> [code] => -13
<***> [message] => Error: Please enter the wallet passphrase with walletpassphrase first.
<***> Of deze, ook met sendfrom
<***> [code] => -1
<***> [message] => CWallet::GenerateNewKey() : AddKey failed
<wumpus> ja die -13 zou je verwachten idd
As the cs_wallet lock is always held before calling wallet RPCs, a possible solution would be to aquire cs_wallet in LockWallet (https://github.com/bitcoin/bitcoin/blob/master/src/rpcwallet.cpp#L1545).