Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000204OCaml~DO NOT USE (was: OCaml general)public2000-10-16 12:032000-11-02 13:25
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000204: open_connection in ThreadUnix
DescriptionFull_Name: Pierre Crégut
Version: 3.00 and earlier
OS:
Submission from: machine107.cnet.fr (193.49.124.107)


If connect fails in [ThreadUnix.open_connection] then the locally created socket

is lost but not closed. This consumes descriptors.

let open_connection sockaddr =
  let domain =
    match sockaddr with
      ADDR_UNIX _ -> PF_UNIX
    | ADDR_INET (_, _) -> PF_INET
  in
  let sock = socket domain SOCK_STREAM 0 in
  try
    connect sock sockaddr; in_channel_of_descr sock, out_channel_of_descr sock
 
  with e -> close socket; raise e (* <--- *)

A similar treatment is probably needed for [establish_server]

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000453)
administrator (administrator)
2000-11-02 13:25

Fixed 2000-11-02 by XL.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker