Closed
      
        Bug 1236855
      
      
        Opened 9 years ago
          Closed 7 years ago
      
        
    
  
[Gij] Bind to 0 port (use OS to get open port) rather than polling for empty ports for Marionette Server
Categories
(Testing Graveyard :: JSMarionette, defect)
        Testing Graveyard
          
        
        
      
        
    
        JSMarionette
          
        
        
      
        
    Tracking
(Not tracked)
        RESOLVED
        INCOMPLETE
        
    
  
People
(Reporter: mikehenrty, Unassigned)
Details
From https://bugzilla.mozilla.org/show_bug.cgi?id=1236376#c3
Hah, so by default empty-port would use a MAX_PORT of 65537 (65535 being the true valid max), so 2/5507 times it would pick a completely illegal port.  By specifying the max port now you help eliminate that foolishness.
Meta-wise, the randomly try a port solution is strictly worse than just binding to a 0 port to see what the OS allocates since the empty-port implementation could waste a lot of time randomly picking ports that are already taken.
Better yet would be to change the port-assigning dance by having the thing that ends up listening do the bind and then provide it over a named pipe or writing to a file or stdout or something.  That would avoid port allocation races, etc."
| Comment 1•7 years ago
           | ||
Bulk closed as part of https://bugzilla.mozilla.org/show_bug.cgi?id=1422750
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
| Updated•7 years ago
           | 
Product: Testing → Testing Graveyard
          You need to log in
          before you can comment on or make changes to this bug.
        
 
 
Description
•