Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Free old ssl session.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Morrison committed Oct 22, 2012
1 parent 649d981 commit 9639ba6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SPDY/SPDY/SPDY.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ - (SpdySession *)getSession:(NSURL *)url withError:(NSError **)error {
if (session != nil && ([session isInvalid] || currentStatus != session.networkStatus)) {
SPDY_LOG(@"Resetting %@ because invalid: %i or %d != %d", session, [session isInvalid], currentStatus, session.networkStatus);
[session resetStreamsAndGoAway];
[self.sessions removeObjectForKey:key];
oldSslSession = [session getSslSession];
[self.sessions removeObjectForKey:key];
session = nil;
}
if (session == nil) {
Expand Down
5 changes: 4 additions & 1 deletion SPDY/SPDY/SpdySession.m
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,11 @@ - (void)setUpSSL {
return;
}
SSL_set_app_data(ssl, self);
if (oldSslSession)
if (oldSslSession) {
SSL_set_session(ssl, oldSslSession);
SSL_SESSION_free(oldSslSession); // Reference taken in getSslSession.
oldSslSession = NULL;
}
}

- (BOOL)sslConnect {
Expand Down
Binary file modified install/lib/libSPDY.a
Binary file not shown.

0 comments on commit 9639ba6

Please sign in to comment.