Author: rfm
Date: Fri Oct  3 06:59:52 2014
New Revision: 38102

URL: http://svn.gna.org/viewcvs/gnustep?rev=38102&view=rev
Log:
retain/release fix by Sergei Golovin

Modified:
    libs/webserver/trunk/ChangeLog
    libs/webserver/trunk/Internal.h
    libs/webserver/trunk/WebServer.m

Modified: libs/webserver/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/ChangeLog?rev=38102&r1=38101&r2=38102&view=diff
==============================================================================
--- libs/webserver/trunk/ChangeLog      (original)
+++ libs/webserver/trunk/ChangeLog      Fri Oct  3 06:59:52 2014
@@ -1,3 +1,9 @@
+2014-10-02 Sergei Golovin
+
+       * WebServer.m: Fix memory management error ... failure to retain
+       the thread used for the main I/O ... was resulting in double
+       release of the thread when the WebServer instance was destroyed.
+
 2014-08-04 Richard Frith-Macdonald  <[email protected]>
 
        * WebServer.m: Run the main run loop and wait for connections to

Modified: libs/webserver/trunk/Internal.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/Internal.h?rev=38102&r1=38101&r2=38102&view=diff
==============================================================================
--- libs/webserver/trunk/Internal.h     (original)
+++ libs/webserver/trunk/Internal.h     Fri Oct  3 06:59:52 2014
@@ -64,10 +64,10 @@
 @interface     IOThread : NSObject
 {
 @public
-  WebServer    *server;        // The owner of this thread.
+  WebServer    *server;        // The owner of this thread (not retained).
   NSThread     *thread;        // The actual thread being used.
   NSLock       *threadLock;    // Protect ivars from changes.
-  NSTimer      *timer;         // Repeated regular timer.
+  NSTimer      *timer;         // Repeated regular timer (not retained).
   NSTimeInterval cTimeout;     // Timeout period for connections.
   GSLinkedList *processing;    // Connections processing a request.
   GSLinkedList *handshakes;    // Connections performing SSL handshake

Modified: libs/webserver/trunk/WebServer.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webserver/trunk/WebServer.m?rev=38102&r1=38101&r2=38102&view=diff
==============================================================================
--- libs/webserver/trunk/WebServer.m    (original)
+++ libs/webserver/trunk/WebServer.m    Fri Oct  3 06:59:52 2014
@@ -2544,7 +2544,7 @@
   _connectionTimeout = 30.0;
   _lock =  [NSLock new];
   _ioMain = [IOThread new];
-  _ioMain->thread = [NSThread currentThread];
+  _ioMain->thread = [[NSThread currentThread] retain];
   _ioMain->server = self;
   _ioMain->cTimeout = _connectionTimeout;
   _pool = [GSThreadPool new];


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to