Mantis - Resin
Viewing Issue Advanced Details
6208 minor always 12-18-18 19:15 01-10-19 15:15
closed 4.0.59  
none 4.0.60  
0006208: ResinEmbed.join never exits
There appears to be a bug in ResinEmbed.join. This method sleep() + poll() the lifecycle of the ResinEmbed's interior Resin instance (_resin). When ResinEmbed.stop(), .close() or .destroy() is called it will run through the Resin instance applying to all of the contained instances. However, it does not change the livecycle of the _resin field on ResinEmbed so in the ResinEmbed.join() method the 'while (! _resin.isClosed())' statement never exits the loop gracefully. Found while dianosing 0006207.

01-10-19 15:15   
Note: the purpose of the change was because of timing/threading issues with closing outstanding openssl connections at shutdown, leaving them to be closed during GC'd instead of a forced close. The fix attempts to close the file descriptor without incurring those openssl issues.