Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Internet/Indy    [ Add a report in this area ]  
Report #:  106514   Status: Open
Provide code to unregister Peer when using IPIndyImpl package in dynamic packaged apps
Project:  Delphi Build #:  16.0.4429.46931
Version:    16.4 Submitted By:   Chee Yang Chau
Report Type:  Basic functionality failure Date Reported:  6/18/2012 11:53:26 PM
Severity:    Serious / Highly visible problem Last Updated: 6/19/2012 7:03:27 AM
Platform:    All platforms Internal Tracking #:   29108
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
IndyPeerImpl.pas register a list of PeerFactory in initialization section:

  PeerFactory.RegisterPeer(IPImpId, IIPPeerProcs, TIdProc);
  PeerFactory.RegisterPeer(IPImpId, IIPStack, TIdStackPeer);

  PeerFactory.RegisterPeer(IPImpId, IIPHTTP, TIdHTTPPeer);
  PeerFactory.RegisterPeer(IPImpId, IIPSSLIOHandlerSocketOpenSSL, TIdSSLIOHandlerSocketOpenSSLPeer);
  PeerFactory.RegisterPeer(IPImpId, IIPTCPClient, TIdTCPClientPeerIP);
  PeerFactory.RegisterPeer(IPImpId, IIPBasicAuthentication, TIdBasicAuthenticationPeer);
  PeerFactory.RegisterPeer(IPImpId, IIPX509, TIdX509Peer);

  //server specific peers
  PeerFactory.RegisterPeer(IPImpId, IIPServerIOHandlerSSLOpenSSL, TIdServerIOHandlerSSLOpenSSLPeer);
  PeerFactory.RegisterPeer(IPImpId, IIPHTTPServer, TIdHTTPServerPeer);
  PeerFactory.RegisterPeer(IPImpId, IIPSchedulerOfThreadPool, TIdSchedulerOfThreadPoolPeer);
  PeerFactory.RegisterPeer(IPImpId, IIPTCPServer, TIdTCPServerPeer);
  PeerFactory.RegisterPeer(IPImpId, IIPTestServer, TIPTestServerPeer);

There is no way to free the items register PeerFactory (or there is no way to UnRegister).

This make application that use dynamic package loading cause problem when IPIndyImpl.bpl was loaded and unloaded few times.
Steps to Reproduce:

Tomohiro Takahashi at 6/20/2012 6:09:11 AM -
This report was opened with valid Internal Tracking Number.

Server Response from: ETNACODE01