diff --git a/ChangeLog b/ChangeLog index d0db4a535..b91a0cb53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-07-27 Richard Frith-Macdonald + + * Source/GSStream.m: Fix failure to unschedule from run loop if a + stream is opened more than once. + 2015-07-24 Richard Frith-Macdonald * Headers/GNUstepBase/GSIMap.h: add GSI_MAP_TABLE_S diff --git a/Source/GSStream.m b/Source/GSStream.m index 9cd34c97b..6b7587ca4 100644 --- a/Source/GSStream.m +++ b/Source/GSStream.m @@ -125,10 +125,14 @@ static RunLoopEventType typeForStream(NSStream *aStream) - (void) removeStream: (NSStream*)aStream mode: (NSString*)mode { + /* We may have added the stream more than once (eg if the stream -open + * method was called more than once, so we need to remove all event + * registrations. + */ [self removeEvent: [aStream _loopID] type: typeForStream(aStream) forMode: mode - all: NO]; + all: YES]; } @end