mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 7.4.1451
Problem: Vim hangs when a channel has a callback but isn't referenced. Solution: Have channel_unref() only return TRUE when the channel was actually freed.
This commit is contained in:
@@ -334,12 +334,17 @@ channel_still_useful(channel_T *channel)
|
||||
* Close a channel and free all its resources if there is no further action
|
||||
* possible, there is no callback to be invoked or the associated job was
|
||||
* killed.
|
||||
* Return TRUE if the channel was freed.
|
||||
*/
|
||||
void
|
||||
int
|
||||
channel_may_free(channel_T *channel)
|
||||
{
|
||||
if (!channel_still_useful(channel))
|
||||
{
|
||||
channel_free(channel);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user